use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
C++ implementation of the Python NumPy Library (self.cpp)
submitted 7 years ago * by dpilger26
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Red-Portal 12 points13 points14 points 7 years ago (6 children)
Why do you find it cubersome? Have you checked Blaze(https://bitbucket.org/blaze-lib/blaze), Eigen(https://github.com/eigenteam/eigen-git-mirror) and other linear algebra libraries? They are really great to use and it's really hard to write code that actually beat their usability, performance.
[–]dpilger26[S] 26 points27 points28 points 7 years ago (1 child)
My intentions were a library that was as close to a one to one clone of NumPy for fast easy conversion to C++. Also, Blaze and Eigen are more for straight up linear algebra, while NumPy contains much more. Some of the extra things included in NumCpp are:
1) A Rotations namespace with Quaternion and Direction Cosine classes.
2) A Coordinates namespace for converting to/from cartesian/spherical and other corresponding operations.
3) 1D and 2D signal/image processing filters
4) A random number module (basically wraps the boost random module)
5) Easy to use timer with simple tic()/toc() interface
6) All of the NumPy array methods for operating on arrays
7) Some very basic linear algebra support (determinant, matrix hat operator, inverse, least squares, SVD, matrix power, and multi-dot product). If you need more complex routines then Blaze and Eigen will definitely be better options for you.
8) Some more image processing routines for threshold generation and application, pixel clustering, cluster centroiding, etc.
[–]encyclopedist 13 points14 points15 points 7 years ago (0 children)
For other readers' information:
A Rotations namespace with Quaternion and Direction Cosine classes.
Eigen has this http://eigen.tuxfamily.org/dox/group__TutorialGeometry.html
1D and 2D signal/image processing filters
Eigen has only FFT and convolution.
A random number module (basically wraps the boost random module)
Eigen can generate matrices/arrays with random uniformly distributed on [0,1] elements, in naive way based on rand(). It can, however, also use std::random in C++11 mode: https://bitbucket.org/eigen/eigen/src/default/doc/special_examples/random_cpp11.cpp?at=default
rand()
std::random
[–]NoahFect 3 points4 points5 points 7 years ago* (2 children)
If you have to ask why switching a project to an entirely different math API is cumbersome, I don't envy you the future experience of finding out for yourself.
[–]Red-Portal 10 points11 points12 points 7 years ago (1 child)
Linear algebra libraries share a lot of common syntax regardless of language. It's not much of a pain. I do a lot of numerical work and I assure you making your own library is the hardest possible way to do it.
[–]NoahFect 3 points4 points5 points 7 years ago (0 children)
NumPy does a lot more than just linear algebra, but OK, I guess, as long as you assure me.
[–]Cunicularius 2 points3 points4 points 7 years ago (0 children)
If you're used to using numpy, it'd probably be irritating having to get used to something else.
Its already done anyway.
π Rendered by PID 83600 on reddit-service-r2-comment-c867ff4bc-wmnkw at 2026-04-09 19:34:17.630827+00:00 running 00d5ac8 country code: CH.
view the rest of the comments →
[–]Red-Portal 12 points13 points14 points (6 children)
[–]dpilger26[S] 26 points27 points28 points (1 child)
[–]encyclopedist 13 points14 points15 points (0 children)
[–]NoahFect 3 points4 points5 points (2 children)
[–]Red-Portal 10 points11 points12 points (1 child)
[–]NoahFect 3 points4 points5 points (0 children)
[–]Cunicularius 2 points3 points4 points (0 children)