Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Athan
    @kgryte
    @Pranavchiku I see that you are working on LFortran. Nice!
    The issue I linked to above is to help get acquainted with project conventions and structure. If you’re interested in lower-level things, depending on how things go, we can explore some of stdlib’s native C/Fortran bindings.
    Pranav
    @Pranavchiku
    Yeah that would be great :)
    Pranav
    @Pranavchiku
    For installation, just npm install @stdlib/stdlib is required after cloning right?
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    an excellent initiative Pranav, hopefully you will set an example for others to follow!
    Pranav
    @Pranavchiku
    I guess I built stdlib successfully, and have asked few queries on the issue itself, kindly have a look at those :)
    Athan
    @kgryte
    After cloning, you should follow the development guide: https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md
    However, instead of running make install, just run make install-node-modules; the former builds native add-ons which you do not need to do for the feature you’re working on.
    The package development guide provides an overview of package contents: https://github.com/stdlib-js/stdlib/blob/develop/docs/packages.md
    Pranav
    @Pranavchiku
    Yeah, I followed that and got it installed :)
    Athan
    @kgryte
    Awesome! Great!
    Sam Nolan
    @Hazelfire
    Hey! I'm trying to make a contribution to this library, but am getting bogged down in simply writing the documentation and following out how these README are generated. I see that there are for instance, some directives such as <toc> and <toc-links> in the markdown. Is there something I'm missing and there is something that automatically fills in the content between these two tags? What's modifying your markdown?
    Athan
    @kgryte
    Hey, @Hazelfire! Thanks for reaching out! What are you trying to contribute?
    Are you attempting to contribute a statistical distribution? Otherwise, the only packages which have <toc> directives are namespace READMEs, which, for individual package contributions, shouldn’t need to be touched.
    If it would help, you can use the README snippet found here: https://github.com/stdlib-js/stdlib/blob/develop/tools/snippets/README.md
    That snippet should provide a minimal starting point.
    Athan
    @kgryte
    Snippets are discussed a bit more in this development guide: https://github.com/stdlib-js/stdlib/blob/develop/docs/packages.md#development
    Sam Nolan
    @Hazelfire
    I am trying to contribute a statistical distribution. Metalog (stdlib-js/stdlib#512) Would I need to know how to use the <toc> directives if I was?
    Athan
    @kgryte
    No, you shouldn’t. We can take care of that on our end. Use the README snippet linked to above.
    Athan
    @kgryte
    Typically statistical distributions are comprised of individual packages for the various properties/methods. Those individual packages are then packaged together as part of a distribution class. So, for your the metalog dist, you might start by creating a package for the PDF, followed by CDF, etc. Once those are created, we’d create a namespace which combines those individual packages into a single class.
    A good example of this is @stdlib/stats/base/dists/normal, which has various sub-packages, such as pdf, cdf, quantile, mgf, etc. Those are then packaged up and exposed via both a class implementation @stdlib/stats/base/dists/normal/ctor and a namespace.
    In short, I’d suggest following the precedent, if possible, of the other distributions in the library. If, for whatever reason, those dists are not amenable to what you’re trying to do with Metalog, we can discuss further.
    Athan
    @kgryte
    Looking at the RFC, maybe start with @stdlib/stats/base/dists/metalog/pdf? In which case, you don’t need to know anything about <toc> directives, as those are not applicable for the README you’d create. Instead, you can just use the snippet linked to above or copy and paste a README for a PDF of another distribution and modify accordingly.
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    Now, not that I imply that @stdlib is still not ready, but while you are waiting for it, there is a stop-gap solution: https://www.npmjs.com/package/pymport
    numpy, pandas and everything else come to Node.js
    Dominik Moritz
    @domoritz:matrix.org
    [m]
    I am starting to play with NDArrays and have an API question. Wouldn't it make sense to support creating arrays from typed arrays directly? Something like stdlib.ndarray(new Int32Array(d3.range(10))). Wouldn't that be easier than having to repeat the type and incurring a copy if it doesn't match?
    Dominik Moritz
    @domoritz:matrix.org
    [m]
    :point_up: Edit: I am starting to play with NDArrays and have an API question. Wouldn't it make sense to support creating arrays from typed arrays directly? Something like stdlib.ndarray(new Int32Array(d3.range(10))). Wouldn't that be easier than having to repeat the type?
    Athan
    @kgryte
    @domoritz:matrix.org You can use the stdlib.array API: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/array. This infers the dtype from the input buffer. The ndarray constructor is a “lower level” API.
    5 replies
    Dominik Moritz
    @domoritz:matrix.org
    [m]
    Here is where I am playing with the API to understand it: https://observablehq.com/d/2c266ef99216e94f.
    Athan
    @kgryte
    @domoritz:matrix.org Here is an edited notebook which fixes a bug in the notebook you posted: https://observablehq.com/d/4a040427e7eb3423
    1 reply
    Athan
    @kgryte
    @domoritz:matrix.org Let comments in your notebook.
    Dominik Moritz
    @domoritz:matrix.org
    [m]
    Is there a more high-level version of https://stdlib.io/docs/api/latest/@stdlib/math/strided/ops/add? I want to add vectors.
    Dominik Moritz
    @domoritz:matrix.org
    [m]
    I'm having a hard time getting the arguments right in my vector math. strided.ops.add(a.length, "int32", a, 1, "int32", a, 1, "int32", out, 1) throws RangeError: invalid arguments. Number of indices must match the number of dimensions. ndims: 2. nargs: 1..
    Dominik Moritz
    @domoritz:matrix.org
    [m]
    I also wonder whether you have a method to quickly view ndarrays. Scijs has imshow which I found really convenient when I wanted to debug my array math: https://github.com/scijs/ndarray-imshow.
    Athan
    @kgryte
    @domoritz:matrix.org I’ve updated my notebook based on your recent additions.
    The issue you are encountering is that, for the strided APIs, you need to work directly on the underlying ndarray buffers, rather than on the ndarray object.
    Athan
    @kgryte
    I also demonstrated how to, for matrices, perform row-wise and column-wise cumulative sums.
    Dominik Moritz
    @domoritz:matrix.org
    [m]
    Sweet, thank you for all the demos. That's exactly what we need to get rolling.
    I wonder whether you plan to have more high level APIs for working with strided arrays at some point similar to scijs? This isn't a blocker for my project but given that I had troubles understanding the APIs, I can imagine others may benefit from more convenient APIs as well.
    Athan
    @kgryte
    @domoritz:matrix.org Definitely. Higher level APIs are definitely something we want to add. And some are in progress. We’ve been focusing on C APIs/implementations at the moment, in order to roll out our ufunc functionality. The plan after is to add various slicing and array creation APIs to help with ergonomics.