[SciPy-dev] alternate .flags interface
oliphant at ee.byu.edu
Mon Oct 31 11:17:12 CST 2005
Perry Greenfield wrote:
>I'm wondering if the current flags interface couldn't be made a bit
>easier to use to allow mapping of dictionary keys in to attributes. For
>instead of arr.flags["CONTIGUOUS"]
>If using a dictionary is considered useful (e.g., for getting the whole
>state, it is still possible to allow arr.flags to return a dictionary
>derived object that can be used wherever dictionaries are accepted, and
>likewise, assigning to arr.flags should be able to take a dictionary of
>flags. Any reason we can't support this interface?
Actually this would be easy, because arr.flags already returns a special
object defined in
scipy/base/_internal.py. So yes, it could be done.
More information about the Scipy-dev