API Reference for Enthought Tool Suite 3.0.1
Defines basic traits and functions for the data model.
An 3D array of numbers of shape (Nx, Ny, Nz)
CubeTrait = Trait(None, None, CArray(value = empty(0)))
This enumeration lists the fundamental mathematical coordinate types that Chaco supports.
DimensionTrait = Enum('scalar', 'point', 'image', 'cube')
An NxM array of numbers.
ImageTrait = Trait(None, None, CArray(value = empty(0)))
A single array of numbers.
NumericalSequenceTrait = Trait(None, None, CArray(value = empty(0)))
A sequence of pairs of numbers, i.e., an Nx2 array.
PointTrait = Trait(None, None, CArray(value = empty(0)))
Linear sort order.
SortOrderTrait = Enum('ascending', 'descending', 'none')
Like find_runs(), but returns a list of tuples indicating the start and end indices of runs in the input int_array.
Performs a binary search of a sorted array looking for a specified value.
Returns the lowest position where the value can be found or where the array value is the last value less (greater) than the desired value. Returns -1 if value is beyond the minimum or maximum of values.
find_runs(int_array, order=<'ascending'|'flat'|'descending'>) -> list_of_int_arrays
Given an integer array sorted in ascending/descending order or flat order, returns a list of continuous runs of integers inside the list. for example:
find_runs([1,2,3,6,7,8,9,10,11,15])
returns [ [1,2,3], [6,7,8,9,10,11], [15] ] and:
find_runs([0,0,0,1,1,1,1,0,0,0,0], "flat")
return [ [0,0,0], [1,1,1,1], [0,0,0,0] ]
Returns a left-shifted version of ary with newval inserted on the right.
Generates the points of a regular polygon with specified center, radius, and number of sides.
By default the rightmost point of the polygon is (r,0) but a rotation about the center may be specified with rot_degrees.
Returns the perpendicular distance between pt and the line segment between the points p1 and p2.
Returns the index of pt in the array data.
Raises IndexError if pt is outside the range of values in data.
Returns a right-shifted version of ary with newval inserted on the left.
sort_points(array_of_points, index=<0|1>) -> sorted_array
Takes a list of points as an Nx2 array and sorts them according to their x- or y-coordinate. If index is zero, the points are sorted on their x-coordinate.
| Local name | Refers to |
|---|---|
| argsort | numpy.argsort |
| array | numpy.array |
| CArray | enthought.traits.trait_numeric.CArray |
| concatenate | numpy.concatenate |
| cos | numpy.cos |
| dot | numpy.dot |
| empty | numpy.empty |
| Enum | enthought.traits.trait_types.Enum |
| nonzero | numpy.nonzero |
| pi | numpy.pi |
| radians | math.radians |
| sin | numpy.sin |
| sqrt | math.sqrt |
| take | numpy.take |
| Trait | enthought.traits.traits.Trait |
© Copyright 2002-2008 Enthought, Inc.