[Numpy-discussion] set operation
Tue Aug 17 09:44:48 CDT 2010
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@example.com> wrote:
> On Tue, Aug 17, 2010 at 9:11 AM, gerardob <firstname.lastname@example.org> wrote:
>> I would like to create a set composed of the numbers 2,3,4,...49,50,51.
>> do i do?
> 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
> Then, you can cast it as a set() object:
> >>> b = set(a)
> Does that help?
> Ben Root
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion