Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1179

Comment by HolyBlackCat on How is Numpy able to get an array size at run-time?

$
0
0
You want std::vector rather than a raw array, it can have its size set at runtime. (Uses new[] under the hood to achieve that.) It would also be a nice idea to use something like std::mdspan as your function parameter to be able to accept sub-matrices without copying them into new storage, but it's not supported in GCC yet.

Viewing all articles
Browse latest Browse all 1179

Trending Articles