python - Numpy only on finite entries -


Here is a brief example of a function. This vector shows the map of a vector, however, entries of the NAN or INX should be ignored. At present it looks random to me. Do you have any suggestions?

  Import samples from SAPPY import data as NPP P (VV): Mask = NP.Synff (vv) y = np.NaN * vv v = vv [mask] Y [ Mask] = 1 / V * (Stats. Hmean (v) / len (v)) Back    

I have come up with this kind of construction: import code from nppy as np with the imported data, only work on valid entries of ## and the same Use the vector y def __f (mcq on func, x) A: Mask = np.isfinite (x) y = np.NaN * xy [mask] = func (x [mask]) return y # Implementation of parity function def __pp (X): return 1 / x * (statistics. Hmean (X) / len (x)) DP PP (VV): Return __f (__PP, VV)

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -