[Numpy-discussion] Possible bug in linalg.matrix_rank

Darlan Cavalcante Moreira darcamo at gmail.com
Fri May 23 16:16:02 EDT 2014


argriffi at ncsu.edu writes:

> On Thu, May 22, 2014 at 1:50 PM, Darlan Cavalcante Moreira
> <darcamo at gmail.com> wrote:
>>
>> After updating Ubuntu to 14.04 and thus numpy to version 1.8.1 I'm
>> having problems with the linalg.matrix_rank function that I didn't have
>> before (as far as I know).
>>
>> More specifically, I get the error
>> "TypeError: No loop matching the specified signature was found for ufunc svd_m"
>> when I try to calculate the rank of a non-square complex matrix, but it does not
>> happen for any non-square matrix.
>>
>>
>> Below you can find the cases tyhat work and the case that doesn't work.
>>
>> --8<---------------cut here---------------start------------->8---
>> # Real matrices
>> A = np.random.randn(3,3);
>> A = np.random.randn(4,3);
>> A = np.random.randn(3,4);
>> np.linalg.matrix_rank(A) # Works for any of the previous 'A' matrices
>>
>> # Complex matrices
>> A = np.random.randn(3,3) + 1j*np.random.randn(3,3);
>> A = np.random.randn(4,3) + 1j*np.random.randn(4,3);
>> np.linalg.matrix_rank(A) # Works for any of the previous 'A' matrices
>>
>> # For the matrix below I get the error
>> A = np.random.randn(3,4) + 1j*np.random.randn(3,4);
>> np.linalg.matrix_rank(A) # Does not work and gives me the TypeError
>> --8<---------------cut here---------------end--------------->8---
>>
>>
>> --
>> Darlan Cavalcante Moreira
>> darcamo at gmail.com
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
> This regression should now be fixed in the numpy development version.
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion


Wow, that was fast. Thanks!

I just cloned the git repo and installed the development version and it
is working now.


-- 
Darlan Cavalcante Moreira
darcamo at gmail.com



More information about the NumPy-Discussion mailing list