[SciPy-User] scipy.optimize.nnls - Incompatible Dimensions

Calvin Morrison mutantturkey at gmail.com
Mon Feb 18 14:57:20 EST 2013


ah okay, it works if I rotate it!

Thanks!

trained_matrix = np.rot90(trained_matrix)

On 18 February 2013 14:55, Skipper Seabold <jsseabold at gmail.com> wrote:
> On Mon, Feb 18, 2013 at 2:45 PM, Calvin Morrison <mutantturkey at gmail.com>
> wrote:
>>
>> Hi,
>>
>> I am trying to use scipy's nnls function. Unfortunately I am getting
>> an "incompatible dimensions error, but my dimensions look correct:
>>
>> >> print matrix.shape
>> (13969, 4096)
>>
>> >> print counts.shape
>> (4096,)
>>
>> >> solutions, rnorm = scipy.optimize.nnls(trained_matrix, counts)
>> *** ValueError: incompatible dimensions
>>
>> Any ideas?
>
>
> Ax is a vector of length 13969 not 4096. Maybe you want ||A.Tx - b||_2?
>
> Skipper
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list