Description
Purpose
The idea behind this collection is to provide an index to easily navigate all currently open ndarray's issues which are immediately actionable.
This is meant to be a good starting point for new contributors (e.g. what should I work on?) and it can also help existing contributors to identify trends and hot areas. I have pinned it using GitHub's new feature, so that it doesn't get lost (and stale).
Given that we have ~100 open issues (and more are opened every day), you are very welcome contributing to this taxonomy effort either commenting on this issue or editing it directly (if you have permissions to do so).
I am only adding to this tracker things I can easily understand/where enough context is provided in the issue - if I left something along the way, feel free to add it and to provide more info on it.
New functionality
Documentation
- Guidelines on how to use
ndarray
's types in a public API (Similar toVec<T>
vs&[T]
considerations)
Feature parity
- Equivalent of numpy.where or numpy.nonzero (Issue: Equivalent of numpy.where or numpy.nonzero #466)Kronecker product (or tensor product) (Reference:
np.kron
) (Issue: Kronecker product #652 PR: [WIP] Outer product implementation #690)Scalar versions of standard deviation and variance (Issue: Standard deviation and variance #655)Add dstack, vstack, and hstack (Issue: Add dstack, vstack, and hstack #667)Sorting (Issue: sorting #195)
Interop / Finer-grained control
Implement ascontiguousarray() or contiguous() method (Issue: Implement ascontiguousarray() or contiguous() method #532)Addshrink_to_fit
method (Issue: Add .shrink_to_fit() method for Array #427)
Ergonomics
- Implement
multislice_axis!
macro (Issue: Add multislice_axis! macro #593)New constructor method for 2D arrays from an iterator of 1D arrays/vectors (Issue: Building a 2D ndarray from rows or columns #539)(Improve documentation or add methods for conversion from nestedVec
/ArrayBase
#609)ArrawView
as custom Dynamically Sized Type (Issue: ArrayView as Custom DST #538)Use#[track_caller]
to improve panic info Add#[track_caller]
judiciously #972
Quality of life
- Implement proptest's
Arbitrary
trait forArray
(Issue: Implement proptest's Arbitrary trait for Array #596)Runrustfmt
on the project and add it to the CI pipeline (PR: Run rustfmt and add to travis #608)Runclippy
on the project and take care of the linter warnings (PR: Some Clippy lints #642)
Other
- Add in-place variants of dimension-changing operations for dynamic-dimensional arrays (Issue: Add in-place variants of dimension-changing operations for dynamic-dimensional arrays #428)
Improvements
Documentation
- Add a new example to
ndarray-examples
Provide more details onAxis
NewType pattern rationale (Issue: Document reason for strongly typedAxis
? #564)Document ndarray's equivalent to NumPy'sastype
(Issues: ndarray equivalent of numpy.astype? #493 , Accepting integer arguments for Array::range? #525)Improve doc examples forZip
/azip
with failing examples (Issue: Zip and azip! behavior related to inputted NdProducers #453)
Error messages / Debugging
- Better messages for incompatible shapes errors (Issue: Incompatible shapes error could give more information. #449).
Better formatting withDebug
for arrays (Issue: Smarter Debug formatting for arrays #398, PR: Implemented a function for smarter debug formatting. #606)
Sharp API edges/corner cases
Avoid panicking for zero-length axis inmap_axis
/map_axis_mut
(Issue: Support zero-lengthaxis
in.map_axis/_mut()
#579)Refactor all dimension-related traits (Issues: Plan for dimension types #519 Shape<D> and StrideShape<D> should be merged #367)
Core
ChangeArrayBase.ptr
toNonNull
type (Issue: Change ArrayBase.ptr to NonNull type #434 PR: Change ArrayBase.ptr to NonNull type #683)Provide more direct mutable access to shape, strides, and owned data (Issues: Provide more direct mutable access to shape, strides, and owned Vec #429 Direct access to Shape #592)
Performance
- Have a look at
sum_3_azip
(Issue: Investigate sum_3_azip's performance #561)Faster, arbitrary-order iterators (Issue: Faster iterator for arbitrary order #469)Co-broadcasting/two-sided broadcasting performance fixes Fixes and follow-ups to two-sided broadcasting in arithmethic ops #936
Activity
LukeMathWalker commentedon Mar 17, 2019
Going through all of these issues, I have starting to think at broader challenges which should probably fall under
ndarray
's umbrella or are relevant to the project:numpy.einsum
equivalentndarray-*
crates into therust-ndarray
organization, harmonizing interfaces and integrating docs where appropriateoracleofnj commentedon May 1, 2019
I've started taking a crack at einsum here. The implementation I have there has multiple issues (performance and otherwise) and is not at all ready for production, but is apparently correct. I'm actively working on improving the implementation. There's a web frontend that uses the crate as a WASM module deployed here.
LukeMathWalker commentedon May 2, 2019
The front-end is what I dreamed I could have when I started to use
np.einsum
back in the days - quite cool @oracleofnj!Parsing the output correctly is definitely the first step there - then it comes down to properly optimizing the computation path based on the inputs and the specified contractions. What is your attack plan @oracleofnj?
oracleofnj commentedon May 2, 2019
After reading through the implementations/documentation in numpy and opt_einsum, I'm writing the base cases to handle a single operand or a pair of operands and then I'll write a function that takes the general case along with a pre-specified path and iterates along the path using the base cases. Last will come an independent function (or functions) to optimize the path given the operand sizes.
oracleofnj commentedon May 24, 2019
I published a beta version of my crate to crates.io. It still has some issues but it's far enough along that you are welcome to give it a spin. There is a minimal example (and more in the tests/benches) at the crate repo where you should feel free to open any issues - we can move the discussion there.
TheButlah commentedon Dec 19, 2020
Just came across some missing functionality that might want to be tracked here: #865
Equivalent numpy feature: slicing on a variable number of indices
8 remaining items