Re: difference between 2 arrays

2009-08-21 Thread Gabriel Genellina
En Thu, 20 Aug 2009 06:54:05 -0300, Michel Claveau - MVPenleverLesX_XXmcX@xmclavxeaux.com escribió: Yes, the module sets is written, in doc, like deprecated. But: - sets exist in Python 2.6 ( 2.5 or 2.4) - documentation of sets (module) is better tha, documentation of set (builtin)

Re: difference between 2 arrays

2009-08-20 Thread Michel Claveau - MVP
(envoyé via news:\\news.wanadoo.fr\comp.lang.python) Hi! Yes, the module sets is written, in doc, like deprecated. But: - sets exist in Python 2.6 ( 2.5 or 2.4) - documentation of sets (module) is better tha, documentation of set (builtin) The best: read the documentaion of the module,

Re: difference between 2 arrays

2009-08-19 Thread Michel Claveau - MVP
Re ! Juste pour signaler qu'il existe un newsgroup en français sur Python, qui permet de recevoir des réponses en français (donc plus complètes/détaillées). @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: difference between 2 arrays

2009-08-19 Thread John Machin
On Aug 19, 6:56 pm, Michel Claveau - MVPenleverlesx_xx...@xmclavxeaux.com wrote: See the module sets See especially the notice at the front of the current sets doc which says deprecated since 2.6 and the comparison down the end which explains why the built-in set() and frozenset() are better

Re: difference between 2 arrays

2009-08-19 Thread baalu aanand
On Aug 19, 1:48 pm, Pierre pierre.gaill...@gmail.com wrote: Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... I thought a.difference(b)

Re: difference between 2 arrays

2009-08-19 Thread baalu aanand
On Aug 19, 1:48 pm, Pierre pierre.gaill...@gmail.com wrote: Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... I thought a.difference(b)

Re: difference between 2 arrays

2009-08-19 Thread Matthias Huening
Pierre (19.08.2009 10:48): Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] What about set()? a = set([1,2, 3,2,5,2]) b = set([1,2]) a.difference(b) set([3, 5]) Matthias --

Re: difference between 2 arrays

2009-08-19 Thread David Robinow
On Wed, Aug 19, 2009 at 4:48 AM, Pierrepierre.gaill...@gmail.com wrote: Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... I thought

Re: difference between 2 arrays

2009-08-19 Thread Diez B. Roggisch
baalu aanand wrote: On Aug 19, 1:48 pm, Pierre pierre.gaill...@gmail.com wrote: Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... I

Re: difference between 2 arrays

2009-08-19 Thread Robert Kern
On 2009-08-19 01:48 AM, Pierre wrote: Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... You will want to ask numpy questions on the numpy

Re: difference between 2 arrays

2009-08-19 Thread sturlamolden
On 19 Aug, 01:48, Pierre pierre.gaill...@gmail.com wrote: Well, the equivalence of setdiff in matlab... That would be numpy.setdiff1d. -- http://mail.python.org/mailman/listinfo/python-list

Re: difference between 2 arrays

2009-08-19 Thread Jan Kaliszewski
19-08-2009 o 10:56:20 Michel Claveau - MVPenleverLesX_XXmcX@xmclavxeaux.com wrote: (envoyé via news:\\news.wanadoo.fr\comp.lang.python) Hi! See the module sets No, see the builtin set type. Module sets is deprecated (removed in Py 3.x) -- Jan Kaliszewski (zuo) z...@chopin.edu.pl --

difference between 2 arrays

2009-08-19 Thread Pierre
Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... I thought a.difference(b) could work, but no : AttributeError: 'numpy.ndarray' object has no

Re: difference between 2 arrays

2009-08-19 Thread Diez B. Roggisch
Pierre wrote: Hello, I would like to know how to find the difference (set operation) between 2 arrays : a = array([1,2, 3,2,5,2]) b = array([1,2]) I want a - b = [3,5] Well, the equivalence of setdiff in matlab... I thought a.difference(b) could work, but no : AttributeError:

Re: difference between 2 arrays

2009-08-19 Thread Michel Claveau - MVP
(envoyé via news:\\news.wanadoo.fr\comp.lang.python) Hi! See the module sets @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list