Tue Jul 14 02:27:58 CDT 2009
--- On Tue, 7/14/09, Robert Kern <firstname.lastname@example.org> wrote:
> From: Robert Kern <email@example.com>
> Subject: Re: [SciPy-dev] generic.base
> To: "SciPy Developers List" <firstname.lastname@example.org>
> Date: Tuesday, July 14, 2009, 12:06 AM
> On Tue, Jul 14, 2009 at 00:50, David
> > Hi! I'm working on the Scalar Base Class category
> and, after a little bit of a shaky start, I think I have a
> pretty good handle on it now. I wanted to see for my self
> whether or not generic.base is "settable" (i.e., after
> object creation), so I instantiated an np.complex64 object,
> > g = np.complex64(1)
> > and then tried various ways (e.g., h=g.copy(),
> h=g.view(), h=g.real, h=g.imag) to create a view of g (i.e.,
> create an object that shared its memory), but in all cases
> h.base returned None, meaning, IIUC, h is _not_ a view of
> (does not share memory with) g. So my questions are: are
> objects derived from generic "viewable";
> They are not. The scalar types need to be immutable and
> allowing views
> would make violating that too easy.
> > is so, how; if not, why the base property?
> So as to expose a consistent interface.
> Robert Kern
> "I have come to believe that the whole world is an enigma,
> a harmless
> enigma that is made terrible by our own mad attempt to
> interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> Scipy-dev mailing list
More information about the Scipy-dev