dpilger26 / NumCpp

C++ implementation of the Python Numpy library

Home Page:https://dpilger26.github.io/NumCpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nc::append should be able to operate empty NdArray<> too.

TorokLev opened this issue · comments

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.

This applies to stack, vstack and hstack too.

Implemented as part of release version 2.11.0.