I want all numpy arrays to be forced to be 2 dimensional
As noted above, the np.matrix class has semantics quite similar to a matlab array.
However, if you goal is to learn numpy as a marketable skill, I would strongly recommend you fully embrace the concept of an ndarray; while there is some historical truth to calling numpy a port of matlab, it is a bit of an insult, as the ndarray is one of the most compelling objective conceptual improvements of numpy over matlab, other than its price.
TLDR; you will have a hard time not getting your application tossed by me if you claim to know numpy, but your code samples smell like ported matlab in any way.
I am coming over from Matlab, and while everything was mostly ported over really well (the community has to be thanked for this, a Matlab license costs way over $1000). There is one thing that I cannot for the life of me find out.
In Matlab, all arrays are 2D (until recently, where they gave you other options). Such that, when I define a scalar, array, matrix they are all considered 2D. This is pretty useful when doing matrix multiplication!
In Python, when using numpy. Unfortunately, I find myself having to use the reshape command quite frequently.
Is there anyway that I can globally set that all array's have 2D dimensions unless stated otherwise?
Edit:
According to the numpy documentation numpy.matrix may be removed in the coming future. What I want to do in essence is that have all output of any numpy operation have the function np.atleast_2d applied to them automatically.