[Numpy-discussion] What is an empty matrix ?
Wed Jul 4 07:21:00 CDT 2007
As for me, I used empty matrices in MATLAB as well as python rather often.
from numpy import array, hstack
m = A.shape
a = array(()).reshape(0,m)
for i in some_ind:
a = hstack((a, A[i]))
for i in some_ind2:
a = hstack((a, Aeq[i]))
from numpy import append
def myfunc(arr, arr2 = numpy.array(()))
assert(arr.ndim==1 and arr2.ndim==1)
return append(arr, arr2, 1)
David Cournapeau wrote:
> I was wondering what an empty matrix is, and what it is useful for
> (by empty matrix, I mean something created by numpy.matrix()) ? Using
> those crash some functions (see for example scipy ticket #381), and I am
> not sure how to fix this bug.
> Numpy-discussion mailing list
More information about the Numpy-discussion