Comments (1)
This has been a bit of a pain point for a while. You are correct, the extents return one extra index than one would expect from traditional slicing or indexing semantics. In other words, the range [position, position+extent]
is inclusive. I say it's a pain point because most users expect the range to be exclusive [position, position+extent)
, so that the value at the index position+extent
should not be returned from the Tag.
This has been the case since the beginning of NIX, but we recently decided to make it more flexible by allowing users to specify how the indexing/slicing should work and default to the most expected case (exclusive). It's a little bit more complicated than simply removing the last index however, since position+extent
can fall in between indexes on the underlying DataArray's dimension. This opens up a set of questions about what should happen if the end point is or is not equal to an index.
We expect the new functionality to be included in the next release. The design document for the new rules is still open for review in a PR on NIX.
from nixpy.
Related Issues (20)
- Catch exception for old boolean type HOT 1
- Convert string columns in DataFrame data
- Disable check for __eq__ on subclasses
- Refactor object creation HOT 1
- New Tag data retrieval behaviour (inclusive vs exclusive)
- Broken references for nested Source HOT 2
- AliasRangeDimension documentation and simplification HOT 2
- Tagged data from a DataArray with polynom_coefficients and "alias" RangeDimension
- MultiTag.tagged_data: OOB and non-intuitive slicing HOT 1
- Upgrading 1.4.9 files fail HOT 1
- Changing property raises exception in 1.5.0 HOT 5
- Clarification: Bindings for C++ NIX HOT 2
- Error upgrading file on py3.6 HOT 2
- Creating a block with only "name" provided ignores the "name" value HOT 4
- [Block] Inconsistent ValueError/DuplicateName exception
- Container item delete methods HOT 1
- HDF5 RuntimeError on second+ level Section copy
- 1.5.1 Autogenerated release tars still say "dev" instead of release HOT 2
- Automatic conversion of metadata to np.str_ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixpy.