[Numpy-discussion] _contiguous A trap for the unwary
Todd Miller
jmiller at stsci.edu
Wed Feb 11 10:14:11 EST 2004
On Tue, 2004-02-10 at 16:43, Colin J. Williams wrote:
> The assignment of a value to self._shape has an unexpected side-effect.
>
> self.iscontiguous() changes from True to False - desirable, but
> unexpected
> self._contiguous remains with the value 2.
>
> I had expected _contiguous to be in step with iscontiguous().
>
> How does the function iscontiguous() determine contiguity?
> Is the variable now redundant?
As I recall, the attribute is used to override the function for
testing. It's private, so ignore it.
Regards,
Todd
--
Todd Miller <jmiller at stsci.edu>
More information about the NumPy-Discussion
mailing list