5
votes
1answer
71 views

numpy: using operator - with arrays containing None

I have a list of numbers which I put into a numpy array: >>> import numpy as np >>> v=np.array([10.0, 11.0]) then I want to subtract a number from each value in the array. It can ...
0
votes
1answer
180 views

rank array in python while ignoring missing values

I'd like to rank a numpy array without getting the number positions changed. I was able to do it using the numpy function below but it keeps ranking the 'NaN' values as well, how can I get it to ...
1
vote
2answers
266 views

Missing values masked array correlation (numpy.ma)

I am trying to use numpy.ma.corrcoef to calculate correlations in the presence of missing data. According to the documentation: Except for the handling of missing data this function does the same as ...
1
vote
2answers
333 views

Recode missing data Numpy

I am reading in census data using the matplotlib cvs2rec function - works fine gives me a nice ndarray. But there are several columns where all the values are '"none"" with dtype |04. This is ...