[SciPy-User] Masking multiple fields in astructuredtimeseriesobject.
Pierre GM
pgmdevlist at gmail.com
Tue Jan 12 16:06:10 EST 2010
On Jan 12, 2010, at 4:01 PM, Dharhas Pothina wrote:
>
>
>
> _series['name'] is a 1D array w/ dtype '|S3'. What you'd want is to transform it into a 2D array of '|S1'. You could try to look chararray, but I'm not sure it'll help you. I'm afraid you gonna have to stick w/ the for loop. You may get it inlined, though:
> ['BB' in _ for _ in _series['name']]
>
> thanks. Would the inline version be any faster or is it pretty much equivalent to an ordinary loop?
I think inlined loops are a tad faster than the regular ones (they get optimized by the interpreter, if I understand correctly). Not 100% sure, though.
More information about the SciPy-User
mailing list