nc::append should be able to operate empty NdArray<> too.
TorokLev opened this issue · 2 comments
TorokLev commented
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
In Python it looks like this:
collector = np.array([])
np.append(collector, 3)
it should look similar in C++
#include <NumCpp.hpp>
nc::NdArray<double> collector;
nc::append( collector, {3});
but it breaks since collector is empty.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
TorokLev commented
This applies to stack, vstack and hstack too.
dpilger26 commented
Implemented as part of release version 2.11.0.