[SciPy-user] Mathematica Element-wise Multiplication
Thu Dec 20 16:15:47 CST 2007
On 19-Dec-07, at 8:50 PM, Travis E. Oliphant wrote:
> Yes, absolutely, warnings should be there in the docstring. Your
> perspective is not illogical nor are many of us unsympathetic to it.
> But, following your rule would be an "exceptional" case to an
> otherwise easy to explain rule.
> Our approach thus far has been to educate users coming from other
> languages that there is such a thing as a 1D array that is neither a
> "row" nor a "column" vector and so in fact a transpose operation is
> really what you meant (as it does nothing to a 1D array). Instead
> you wanted to do was convert the 1-D array to a 2-D array with 1
> row and
> then transpose that to a 2D array with 1 column.
Would it be totally crazy to throw an exception if you try to
access .T on a 1D array? Since it's not meaningful, I don't see a
compelling reason why it should need to succeed.
Also, would more... aggressively encouraging use of the "matrix" type
help alleviate the migration pains?
More information about the SciPy-user