[Numpy-discussion] Adding a linear system type to NumPy?

2011-07-17 Thread Sturla Molden
The problem I am thinking we might try to might fix is that programmers with less numerical competence is unaware that the matrix expression (X**-1) * Y should be written as np.linalg.solve(X,Y) I've seen numerous times matrix expressions being typed exactly as written in linear

Re: [Numpy-discussion] Adding a linear system type to NumPy?

2011-07-17 Thread Alan G Isaac
On 7/17/2011 1:57 PM, Sturla Molden wrote: I suggest inverting a NumPy matrix could result in an unsolved linear system type, instead of actually computing the matrix inverse and returning a new matrix. 1. Too implicit. 2. Too confusing for new users. 2a. Too confusing for students.

Re: [Numpy-discussion] Adding a linear system type to NumPy?

2011-07-17 Thread Dag Sverre Seljebotn
Something related: This autumn I expect to invest a significant amount of time (more than four weeks full-time) in a package for lazily evaluated, polymorphic linear algebra. Matrix = linear operator, a type seperate from arrays -- arrays are treated as vectors/stacked vectors Matrices can be

Re: [Numpy-discussion] Adding a linear system type to NumPy?

2011-07-17 Thread Dag Sverre Seljebotn
More concrete feedback about Sturla's proposal: The problem I have is if you do A = B**-1 Then, A is some 'magic' object, not a NumPy array. That means that it is very different from Matlab's \, which restricts the context, you simply can't do A = B \ I think A.solve(u) is a lot clearer in