/usr/lib64/python2.6/site-packages/numpy/lib
NameSizeModeActions
benchmarks/-0755rm
tests/-0755rm
arraysetops.py137040644editdlrm
arraysetops.pyc133800644editdlrm
arraysetops.pyo133800644editdlrm
arrayterator.py64370644editdlrm
arrayterator.pyc70220644editdlrm
arrayterator.pyo70220644editdlrm
financial.py208720644editdlrm
financial.pyc215460644editdlrm
financial.pyo215460644editdlrm
format.py193090644editdlrm
format.pyc172790644editdlrm
format.pyo172790644editdlrm
function_base.py1005240644editdlrm
function_base.pyc991690644editdlrm
function_base.pyo991690644editdlrm
getlimits.py87900644editdlrm
getlimits.pyc100530644editdlrm
getlimits.pyo100530644editdlrm
index_tricks.py267900644editdlrm
index_tricks.pyc280080644editdlrm
index_tricks.pyo280080644editdlrm
info.py62400644editdlrm
info.pyc64250644editdlrm
info.pyo64250644editdlrm
io.py532260644editdlrm
io.pyc441020644editdlrm
io.pyo441020644editdlrm
machar.py106580644editdlrm
machar.pyc86880644editdlrm
machar.pyo86880644editdlrm
polynomial.py355620644editdlrm
polynomial.pyc381390644editdlrm
polynomial.pyo381390644editdlrm
recfunctions.py320380644editdlrm
recfunctions.pyc294510644editdlrm
recfunctions.pyo294510644editdlrm
scimath.py139970644editdlrm
scimath.pyc158670644editdlrm
scimath.pyo158670644editdlrm
setup.py5880644editdlrm
setup.pyc9180644editdlrm
setup.pyo9180644editdlrm
setupscons.py4700644editdlrm
setupscons.pyc8240644editdlrm
setupscons.pyo8240644editdlrm
shape_base.py243870644editdlrm
shape_base.pyc252910644editdlrm
shape_base.pyo252910644editdlrm
stride_tricks.py39720644editdlrm
stride_tricks.pyc38630644editdlrm
stride_tricks.pyo38630644editdlrm
twodim_base.py229460644editdlrm
twodim_base.pyc254640644editdlrm
twodim_base.pyo254640644editdlrm
type_check.py170750644editdlrm
type_check.pyc183920644editdlrm
type_check.pyo183920644editdlrm
ufunclike.py54520644editdlrm
ufunclike.pyc63110644editdlrm
ufunclike.pyo63110644editdlrm
user_array.py74750644editdlrm
user_array.pyc157270644editdlrm
user_array.pyo157270644editdlrm
utils.py340340644editdlrm
utils.pyc304220644editdlrm
utils.pyo304220644editdlrm
_compiled_base.so197200755editdlrm
_datasource.py206380644editdlrm
_datasource.pyc209860644editdlrm
_datasource.pyo209860644editdlrm
_iotools.py277120644editdlrm
_iotools.pyc269160644editdlrm
_iotools.pyo269160644editdlrm
__init__.py9360644editdlrm
__init__.pyc10380644editdlrm
__init__.pyo10380644editdlrm
Edit: /usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyc (13380B)
Ńň \ĐKc @sÔdZddddddddd d g Zd d kZd d klZd d d„Zeed„Z ed„Z ed„Z ed„Z d„Z ed„Zeeed„ƒZed„ƒZed„ƒZd S(sP Set operations for 1D numeric arrays based on sorting. :Contains: ediff1d, unique, intersect1d, setxor1d, in1d, union1d, setdiff1d :Deprecated: unique1d, intersect1d_nu, setmember1d :Notes: For floating point arrays, inaccurate results may appear due to usual round-off and floating point comparison issues. Speed could be gained in some operations by an implementation of sort(), that can provide directly the permutation vectors, avoiding thus calls to argsort(). To do: Optionally return indices analogously to unique for all functions. :Author: Robert Cimrman tediff1dtunique1dt intersect1dtintersect1d_nutsetxor1dt setmember1dtunion1dt setdiff1dtuniquetin1di˙˙˙˙N(t deprecatecCs–ti|ƒi}|d|d }|g}|dj o|id|ƒn|dj o|i|ƒnt|ƒdjoti|ƒ}n|S(s: The differences between consecutive elements of an array. Parameters ---------- ary : array_like If necessary, will be flattened before the differences are taken. to_end : array_like, optional Number(s) to append at the end of the returned differences. to_begin : array_like, optional Number(s) to prepend at the beginning of the returned differences. Returns ------- ed : ndarray The differences. Loosely, this is ``ary.flat[1:] - ary.flat[:-1]``. See Also -------- diff, gradient Notes ----- When applied to masked arrays, this function drops the mask information if the `to_begin` and/or `to_end` parameters are used. Examples -------- >>> x = np.array([1, 2, 4, 7, 0]) >>> np.ediff1d(x) array([ 1, 2, 3, -7]) >>> np.ediff1d(x, to_begin=-99, to_end=np.array([88, 99])) array([-99, 1, 2, 3, -7, 88, 99]) The returned array is always 1D. >>> y = [[1, 2, 4], [1, 6, 24]] >>> np.ediff1d(y) array([ 1, 2, -3, 5, 18]) ii˙˙˙˙iN(tnpt asanyarraytflattNonetinserttappendtlenthstack(tarytto_endtto_begintedtarrays((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyR%s+   c CsŢy|iƒ}WnXtj oL| o(| o tt|ƒƒ}ti|ƒSti|ƒiƒ}nX|idjoj|o3|o,|tidti ƒtidti ƒfS|p|o|tidti ƒfS|Sn|p|oŻ|i ƒ}||}ti t g|d|d jfƒ}|oVti |ƒd}|i ƒ}|o||||||fS||||fSqÚ||||fSn9|iƒti t g|d|d jfƒ}||SdS(s, Find the unique elements of an array. Returns the sorted unique elements of an array. There are two optional outputs in addition to the unique elements: the indices of the input array that give the unique values, and the indices of the unique array that reconstruct the input array. Parameters ---------- ar : array_like Input array. This will be flattened if it is not already 1-D. return_index : bool, optional If True, also return the indices of `ar` that result in the unique array. return_inverse : bool, optional If True, also return the indices of the unique array that can be used to reconstruct `ar`. Returns ------- unique : ndarray The sorted unique values. unique_indices : ndarray, optional The indices of the unique values in the (flattened) original array. Only provided if `return_index` is True. unique_inverse : ndarray, optional The indices to reconstruct the (flattened) original array from the unique array. Only provided if `return_inverse` is True. See Also -------- numpy.lib.arraysetops : Module with a number of other functions for performing set operations on arrays. Examples -------- >>> np.unique([1, 1, 2, 2, 3, 3]) array([1, 2, 3]) >>> a = np.array([[1, 1], [2, 3]]) >>> np.unique(a) array([1, 2, 3]) Return the indices of the original array that give the unique values: >>> a = np.array(['a', 'b', 'b', 'c', 'a']) >>> u, indices = np.unique(a, return_index=True) >>> u array(['a', 'b', 'c'], dtype='|S1') >>> indices array([0, 1, 3]) >>> a[indices] array(['a', 'b', 'c'], dtype='|S1') Reconstruct the input array from the unique values: >>> a = np.array([1, 2, 6, 4, 2, 3, 2]) >>> u, indices = np.unique(a, return_inverse=True) >>> u array([1, 2, 3, 4, 6]) >>> indices array([0, 1, 4, 3, 1, 2, 1]) >>> u[indices] array([1, 2, 6, 4, 2, 3, 2]) iii˙˙˙˙N(tflattentAttributeErrortsortedtsetR tasarrayR tsizetemptytbooltargsortt concatenatetTruetcumsumtsort( tart return_indextreturn_inversetitemstpermtauxtflagtiflagtiperm((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyR_s6E,  &  &cCsX|pt|ƒ}t|ƒ}nti||fƒ}|iƒ||d|d jS(sÉ Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters ---------- ar1, ar2 : array_like Input arrays. assume_unique : bool If True, the input arrays are both assumed to be unique, which can speed up the calculation. Default is False. Returns ------- out : ndarray Sorted 1D array of common and unique elements. See Also -------- numpy.lib.arraysetops : Module with a number of other functions for performing set operations on arrays. Examples -------- >>> np.intersect1d([1, 3, 4, 3], [3, 1, 2, 1]) array([1, 3]) ii˙˙˙˙(RR R!R$(tar1tar2t assume_uniqueR*((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyRÉs   cCsŸ|pt|ƒ}t|ƒ}nti||fƒ}|idjo|S|iƒtitg|d|d jtgfƒ}|d|d j}||S(s˜ Find the set exclusive-or of two arrays. Return the sorted, unique values that are in only one (not both) of the input arrays. Parameters ---------- ar1, ar2 : array_like Input arrays. assume_unique : bool If True, the input arrays are both assumed to be unique, which can speed up the calculation. Default is False. Returns ------- xor : ndarray Sorted 1D array of unique values that are in only one of the input arrays. Examples -------- >>> a = np.array([1, 2, 3, 2, 4]) >>> b = np.array([2, 3, 5, 7, 5]) >>> np.setxor1d(a,b) array([1, 4, 5, 7]) iii˙˙˙˙(RR R!RR$R"(R.R/R0R*R+tflag2((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyRďs  ,c CsÎ|p.ti|dtƒ\}}ti|ƒ}nti||fƒ}|iddƒ}||}|d|d j}ti|tgfƒ}|iddƒt|ƒ } |o || S|| |SdS(s Test whether each element of a 1D array is also present in a second array. Returns a boolean array the same length as `ar1` that is True where an element of `ar1` is in `ar2` and False otherwise. Parameters ---------- ar1 : array_like, shape (M,) Input array. ar2 : array_like The values against which to test each value of `ar1`. assume_unique : bool, optional If True, the input arrays are both assumed to be unique, which can speed up the calculation. Default is False. Returns ------- mask : ndarray of bools, shape(M,) The values `ar1[mask]` are in `ar2`. See Also -------- numpy.lib.arraysetops : Module with a number of other functions for performing set operations on arrays. Notes ----- `in1d` can be considered as an element-wise function version of the python keyword `in`, for 1D sequences. ``in1d(a, b)`` is roughly equivalent to ``np.array([item in b for item in a])``. .. versionadded:: 1.4.0 Examples -------- >>> test = np.array([0, 1, 2, 5, 0]) >>> states = [0, 2] >>> mask = np.in1d(test, states) >>> mask array([ True, False, True, False, True], dtype=bool) >>> test[mask] array([0, 2, 0]) R'tkindt mergesortii˙˙˙˙N(R RR"R!R tFalseR( R.R/R0trev_idxR%tordertsart equal_adjR+tindx((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyR s.  cCstti||fƒƒS(sn Find the union of two arrays. Return the unique, sorted array of values that are in either of the two input arrays. Parameters ---------- ar1, ar2 : array_like Input arrays. They are flattened if they are not already 1D. Returns ------- union : ndarray Unique, sorted union of the input arrays. See Also -------- numpy.lib.arraysetops : Module with a number of other functions for performing set operations on arrays. Examples -------- >>> np.union1d([-1, 0, 1], [-2, 0, 2]) array([-2, -1, 0, 1, 2]) (RR R!(R.R/((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyR\scCsh|pt|ƒ}t|ƒ}nt||dtƒ}|idjo|Sti|ƒ|djSdS(s: Find the set difference of two arrays. Return the sorted, unique values in `ar1` that are not in `ar2`. Parameters ---------- ar1 : array_like Input array. ar2 : array_like Input comparison array. assume_unique : bool If True, the input arrays are both assumed to be unique, which can speed up the calculation. Default is False. Returns ------- difference : ndarray Sorted 1D array of values in `ar1` that are not in `ar2`. See Also -------- numpy.lib.arraysetops : Module with a number of other functions for performing set operations on arrays. Examples -------- >>> a = np.array([1, 2, 3, 2, 4, 1]) >>> b = np.array([3, 4, 5, 6]) >>> np.setdiff1d(a, b) array([1, 2]) R0iN(RR R"RR R(R.R/R0R*((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyRzs" c CsŹ|oddk}|idƒnti|ƒiƒ}|idjoj|o3|o,|tidtiƒtidtiƒfS|p|o|tidtiƒfS|Sn|p|oŻ|iƒ}||}ti t g|d|d jfƒ}|oVti |ƒd}|iƒ} |o|||||| fS|||| fSq¨||||fSn9|i ƒti t g|d|d jfƒ}||SdS(s< This function is deprecated. Use unique() instead. i˙˙˙˙NsĄThe order of the output arguments for `return_index` has changed. Before, the output was (indices, unique_arr), but has now been reversed to be more consistent.ii( twarningstwarnR R RRRRR R!R"R#R$( R.R&R'R:R%R)R*R+R,R-((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyRĽs0 ,  &  &cCsAtit|ƒt|ƒfƒ}|iƒ||d|d jS(sF This function is deprecated. Use intersect1d() instead. ii˙˙˙˙(R R!RR$(R.R/R*((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyRÍs! cCsti||fƒ}|iddƒ}||}|d|d j}ti|tgfƒ}|iddƒt|ƒ }||S(sQ This function is deprecated. Use in1d(assume_unique=True) instead. R2R3ii˙˙˙˙(R R!R R4R(R.R/R%R6R7R8R+R9((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyRŘs  (t__doc__t__all__tnumpyR tnumpy.lib.utilsR RRR4RRRR RRRRR(((s;/usr/lib64/python2.6/site-packages/numpy/lib/arraysetops.pyts :j & , A  +'