On Sun, Feb 28, 2010 at 03:01:18PM +0100, Friedrich Romstedt wrote:
> > Well, I might not have to compare ndarrays, but fairly arbitrary
> > structures (dictionnaries, classes and lists) as I am dealing with
> > semi-structured data coming from a stack of unorganised experimental
> > data. Python h
> Well, I might not have to compare ndarrays, but fairly arbitrary
> structures (dictionnaries, classes and lists) as I am dealing with
> semi-structured data coming from a stack of unorganised experimental
> data. Python has some logic for comparing these structures by comparing
> their members, b
On Sun, Feb 28, 2010 at 01:05:15PM +0200, Pauli Virtanen wrote:
> su, 2010-02-28 kello 10:25 +0100, Gael Varoquaux kirjoitti:
> [clip]
> > The problem is that ndarrays cannot be compared. So I have tried to
> > override the 'cmp' in the 'sorted' function, however I am comparing
> > fairly complex o
su, 2010-02-28 kello 10:25 +0100, Gael Varoquaux kirjoitti:
[clip]
> The problem is that ndarrays cannot be compared. So I have tried to
> override the 'cmp' in the 'sorted' function, however I am comparing
> fairly complex objects, and I am having a hard time predicting wich
> member of the object
Hi,
I need to have list of objects that contain ndarrays to be sorted. The
reason that I want them sorted is that these list are populated in an
arbitrary order, but there order really doesn't matter, and I am trying
to make it reproducible for debugging and hashing.
The problem is that ndarrays