[Tutor] comparing two numpy arrays

Alan Gauld alan.gauld at btinternet.com
Wed Aug 8 20:12:44 CEST 2007

"Andy Cheesman" <Andy.cheesman at bristol.ac.uk> wrote

> only way of interconversion a brute force method?
> i.e a = set([1, 2, 3])
> b = []
> for thing in a:
> b.append(thing)

Which looks a lot like a list comprehension:

b = [member for member in Set([1,2,3])]


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list