[Tutor] create numpy array from list of strings
If the above is intended to be Python code, it has problems. Rewrite it thusly?Then let a numpy expert finish the task. -- Bob Gailer 919-636-4239 Chapel Hill, NC.
If the above is intended to be Python code, it has problems. Rewrite it thusly?Then let a numpy expert finish the task. -- Bob Gailer 919-636-4239 Chapel Hill, NC.
import numpy x=numpy.array([1,4,4,6,7,3,4,2]) x.median().Using the ma.median version by default is something of a workaround, because it appears to work on both numpy arrays and masked arrays.
If I've two numpy arrays, is there a non-looping way of finding common > values. (the example below has identical shapes for the > arrays but this > may not be the case in my scenario) > >.Maybe you might be able to directly convert the numpy arrays to sets?
Andy Cheesman wrote: > I've googled a bit for manipulation of > sets into other data structure(lists, arrays) and not seen much. Is the > only way of interconversion a brute force method? > >