It should be noted that the 'set' type is a basic Python type, and not a NumPy specific type.
On Tue, Aug 17, 2010 at 7:30 AM, Benjamin Root <[email protected]> wrote: > On Tue, Aug 17, 2010 at 9:11 AM, gerardob <[email protected]> wrote: > >> >> I would like to create a set composed of the numbers 2,3,4,...49,50,51. >> How >> do i do? >> Thanks. >> > > Gerard, > > Well, you can easily create a list of those numbers like so: > > >>> a = range(2, 52) # note, you have to go one past the last number you > want > > Then, you can cast it as a set() object: > > >>> b = set(a) > > Does that help? > Ben Root > > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion > >
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
