[SciPy-dev] generic.base

David Goldsmith d_l_goldsmith@yahoo....
Tue Jul 14 02:27:58 CDT 2009


OK, thanks!

DG

--- On Tue, 7/14/09, Robert Kern <robert.kern@gmail.com> wrote:

> From: Robert Kern <robert.kern@gmail.com>
> Subject: Re: [SciPy-dev] generic.base
> To: "SciPy Developers List" <scipy-dev@scipy.org>
> Date: Tuesday, July 14, 2009, 12:06 AM
> On Tue, Jul 14, 2009 at 00:50, David
> Goldsmith<d_l_goldsmith@yahoo.com>
> wrote:
> >
> > 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,
> ala
> >
> >    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
> Scipy-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
> 


      


More information about the Scipy-dev mailing list