Git Product home page Git Product logo

Comments (7)

rreusser avatar rreusser commented on August 11, 2024

Can you elaborate on your use case? I've used it to just just slice an array in one particular dimension without specifying the bounds of the others.

from ndarray.

letmaik avatar letmaik commented on August 11, 2024

Yes exactly, that's what I do as well, slicing across one or more dimensions and leaving others untouched (where I use null then instead of giving explicit full bounds).

from ndarray.

rreusser avatar rreusser commented on August 11, 2024

See: https://github.com/scijs/ndarray-concat-rows/blob/master/index.js#L72

I'm updating the docs for another ticket so will add a note on this now.

from ndarray.

letmaik avatar letmaik commented on August 11, 2024

What about the example? I don't see any null's.

Am 07.01.2016 um 21:49 schrieb Ricky Reusser:

See: https://github.com/scijs/ndarray-concat-rows/blob/master/index.js#L72

I'm updating the docs for another ticket so will add a note on this now.

β€”
Reply to this email directly or view it on GitHub
#23 (comment).

from ndarray.

rreusser avatar rreusser commented on August 11, 2024

Ah, sorry. Yeah, seemed (unless I'm wrong) that as long as it's undefined or null (omitted as an argument = undefined), lo doesn't increase the lower bound and hi doesn't decrease the upper bound in the unspecified dimensions.

from ndarray.

rreusser avatar rreusser commented on August 11, 2024

In other words, I used that to grab a section of the ndarray along the first dimension only by leaving the others implicitly unspecified. Concatenating cols was a little more complicated because I had to construct the array of indices explicitly.

(Side note: I'm realizing as I clean some of this up that really more and more of the code should use dynamic code generation to keep this generic n-dimensional programming from actually having to operate in an abstract number of dimensions. With code generation, you just generate the code for the actual number of dimensions for the given input…)

But anyway, AFAIK, either null or implicitly undefined both works.

from ndarray.

letmaik avatar letmaik commented on August 11, 2024

Right, ok.

About dynamic code generation, as long as it actually has a measureable performance benefit and the code is used enough times that it matters I'm all for it.

from ndarray.

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.