[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.
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? > >
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 convert the arrays to lists or tuples then to sets?
and returns > numpy object arrays, where the elements of the object arrays are > themselves 1d numpy arrays. I don't think there is any other way to do > it. In your example, the 'ragged' array would be a 1d numpy array with > dtype='O'...