[Numpy-discussion] [ANN] mlabrap-1.0final: a high level python to matlab

2007-04-11 Thread Alexander Schmolck
I'm pleased to finally announce mlabwrap-1.0: Project website --- http://mlabwrap.sourceforge.net/ Description --- Mlabwrap-1.0 is a high-level python to matlab(tm) bridge that makes calling matlab functions from python almost as convenient as using a normal python library.

[Numpy-discussion] detecting shared data

2007-04-11 Thread Matthew Koichi Grimes
Is there any way to detect whether one array is a view into another array? I'd like something like: arr = N.arange(5) subarr = arr[1:3] sharesdata(arr, subarr) True -- Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] detecting shared data

2007-04-11 Thread Pierre GM
On Wednesday 11 April 2007 18:12:16 Matthew Koichi Grimes wrote: Is there any way to detect whether one array is a view into another array? I'd like something like: arr = N.arange(5) subarr = arr[1:3] sharesdata(arr, subarr) Mmh, would arr.flags['OWNDATA'] would do the trick ? p.

Re: [Numpy-discussion] detecting shared data

2007-04-11 Thread Stefan van der Walt
On Wed, Apr 11, 2007 at 06:12:16PM -0400, Matthew Koichi Grimes wrote: Is there any way to detect whether one array is a view into another array? I'd like something like: arr = N.arange(5) subarr = arr[1:3] sharesdata(arr, subarr) True Your best bet is probably

Re: [Numpy-discussion] detecting shared data

2007-04-11 Thread Matthew Koichi Grimes
It's better than nothing. I basically want some sanity-check assert code that can assert that some arrays are in fact sub-arrays of another array. Your OWNDATA suggestion meets me halfway by allowing me to check that these sub-arrays are at least sub-arrays of *someone*. Thanks, -- Matt

Re: [Numpy-discussion] detecting shared data

2007-04-11 Thread Bill Baxter
On 4/12/07, Matthew Koichi Grimes [EMAIL PROTECTED] wrote: It's better than nothing. I basically want some sanity-check assert code that can assert that some arrays are in fact sub-arrays of another array. Your OWNDATA suggestion meets me halfway by allowing me to check that these sub-arrays

Re: [Numpy-discussion] detecting shared data

2007-04-11 Thread Anne Archibald
On 11/04/07, Bill Baxter [EMAIL PROTECTED] wrote: Must be pretty recent. I'm using 1.0.2.dev3520 (enthought egg) and the function's not there. It is. I've never been quite happy with it, though; I realize it's not very feasible to write one that efficiently checks all possible overlaps, but