Hi, I've gotten used to using NaN in matrices (mostly for missing data values) in Matlab and Octave. there you can go: a = [ 1 2 ; NaN 4] no problem i tried
a = mat('[1 3 5; 2 5 3; NaN 5 7]') among other things and scipy balks
Is there a way to use NaN in matrices/arrays Tim -- Tim McKenna BU, CNS dept. (617)353-7677(office) (617)524-0938(home) (857)498-2574(mobile)
Tim McKenna wrote:
Hi, I've gotten used to using NaN in matrices (mostly for missing data values) in Matlab and Octave. there you can go: a = [ 1 2 ; NaN 4] no problem
i tried
a = mat('[1 3 5; 2 5 3; NaN 5 7]') among other things and scipy balks
Is there a way to use NaN in matrices/arrays
nans can be used in matrices, nan is the correct spelling in scipy. But, it looks like the string-handling of mat does not handle them well. This is a bug. You can create a matrix with nans using a = mat([[1,3,5],[2,5,3],[nan,5,7]]) -Travis
participants (2)
-
Tim McKenna
-
Travis Oliphant