Next: Do we need a
Up: Design and implementation issues
Previous: Design and implementation issues
  Contents
There are very good reasons that vectors should be treated as 1 x n
and
matrices:
- This is so when n x m matrices are considered as linear
transforms from m-dimensional to n-dimensional spaces.
- Vectors can be sliced off matrices. Matrices can be built from
vectors. They obey the same rules. Most operations should be valid for
both.
- All the rules for vectors and covectors map naturally into the rules
for column and row vectors.
The array type in NumPy behaves more like a diagonal matrix than ordinary
vectors. Therefore we implement vectors as matrices instead.
However, it might be worthwhile to implement a Vector subclass for
efficiency reasons. I do not know how to let Matrix(a) sometimes
return a Vector depending on a.shape.
Huaiyu Zhu
2002-03-23