[SciPy-user] ***[Possible UCE]*** repmat of matrix returns array
oliphant at ee.byu.edu
Thu Apr 27 15:05:28 CDT 2006
Keith Goodman wrote:
>Do most operations on matrices return matrices? In porting Octave
>code, I noticed that the repmat of a matrix is an array.
>I decided to use matrices simply because that's what they are called
>in Octave. What do you recommend for new users who have a background
>in Octave, matrix or array? Do people generally pick one and not use
I usually use arrays all the time and matrices only when I need to
express some matrix formula.
As a result, the matrices are not as well developed (there are issues
like the one you mentioned all over the place). Matrices not being
preserved through operations is a big reason they have not been used in
the past. We are trying to fix this and have some strategies for doing
it (asarray followed by __array_wrap__ at the end). These strategies
have just not been universally applied to all the functions yet.
More information about the SciPy-user