GithubHelp home page GithubHelp logo

(Multi)Tag extent clarification about nixpy HOT 1 CLOSED

DanBenHa avatar DanBenHa commented on August 16, 2024
(Multi)Tag extent clarification

from nixpy.

Comments (1)

achilleas-k avatar achilleas-k commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.