Scalar¶
-
class
lsst.analysis.tools.Scalar¶ Bases:
numbers.Number,numpy.numberThis is an interface only class, and is intended to abstract around all the various types of numbers used in Python.
This has been tried many times with various levels of success in python, and this is another attempt. However, as this class is only intended as an interface, and not something concrete to use it works.
Users should not directly instantiate from this class, instead they should use a built in python number type, or a numpy number.
Attributes Summary
TScalar attribute identical to the corresponding array attribute. baseScalar attribute identical to the corresponding array attribute. dataPointer to start of data. dtypeGet array data-descriptor. flagsThe integer value of flags. flatA 1-D view of the scalar. imagThe imaginary part of the scalar. itemsizeThe length of one element in bytes. nbytesThe length of the scalar in bytes. ndimThe number of array dimensions. realThe real part of the scalar. shapeTuple of array dimensions. sizeThe number of elements in the gentype. stridesTuple of bytes steps in each dimension. Methods Summary
allScalar method identical to the corresponding array attribute. anyScalar method identical to the corresponding array attribute. argmaxScalar method identical to the corresponding array attribute. argminScalar method identical to the corresponding array attribute. argsortScalar method identical to the corresponding array attribute. astypeScalar method identical to the corresponding array attribute. byteswapScalar method identical to the corresponding array attribute. chooseScalar method identical to the corresponding array attribute. clipScalar method identical to the corresponding array attribute. compressScalar method identical to the corresponding array attribute. conjconjugateScalar method identical to the corresponding array attribute. copyScalar method identical to the corresponding array attribute. cumprodScalar method identical to the corresponding array attribute. cumsumScalar method identical to the corresponding array attribute. diagonalScalar method identical to the corresponding array attribute. dumpScalar method identical to the corresponding array attribute. dumpsScalar method identical to the corresponding array attribute. fillScalar method identical to the corresponding array attribute. flattenScalar method identical to the corresponding array attribute. getfieldScalar method identical to the corresponding array attribute. itemScalar method identical to the corresponding array attribute. itemsetScalar method identical to the corresponding array attribute. maxScalar method identical to the corresponding array attribute. meanScalar method identical to the corresponding array attribute. minScalar method identical to the corresponding array attribute. newbyteorder([new_order])Return a new dtypewith a different byte order.nonzeroScalar method identical to the corresponding array attribute. prodScalar method identical to the corresponding array attribute. ptpScalar method identical to the corresponding array attribute. putScalar method identical to the corresponding array attribute. ravelScalar method identical to the corresponding array attribute. repeatScalar method identical to the corresponding array attribute. reshapeScalar method identical to the corresponding array attribute. resizeScalar method identical to the corresponding array attribute. roundScalar method identical to the corresponding array attribute. searchsortedScalar method identical to the corresponding array attribute. setfieldScalar method identical to the corresponding array attribute. setflagsScalar method identical to the corresponding array attribute. sortScalar method identical to the corresponding array attribute. squeezeScalar method identical to the corresponding array attribute. stdScalar method identical to the corresponding array attribute. sumScalar method identical to the corresponding array attribute. swapaxesScalar method identical to the corresponding array attribute. takeScalar method identical to the corresponding array attribute. tobytestofileScalar method identical to the corresponding array attribute. tolistScalar method identical to the corresponding array attribute. tostringScalar method identical to the corresponding array attribute. traceScalar method identical to the corresponding array attribute. transposeScalar method identical to the corresponding array attribute. varScalar method identical to the corresponding array attribute. viewScalar method identical to the corresponding array attribute. Attributes Documentation
-
T¶ Scalar attribute identical to the corresponding array attribute.
Please see
ndarray.T.
-
base¶ Scalar attribute identical to the corresponding array attribute.
Please see
ndarray.base.
-
data¶ Pointer to start of data.
-
dtype¶ Get array data-descriptor.
-
flags¶ The integer value of flags.
-
flat¶ A 1-D view of the scalar.
-
imag¶ The imaginary part of the scalar.
-
itemsize¶ The length of one element in bytes.
-
nbytes¶ The length of the scalar in bytes.
-
ndim¶ The number of array dimensions.
-
real¶ The real part of the scalar.
-
shape¶ Tuple of array dimensions.
-
size¶ The number of elements in the gentype.
-
strides¶ Tuple of bytes steps in each dimension.
Methods Documentation
-
all()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.all.
-
any()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.any.
-
argmax()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.argmax.
-
argmin()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.argmin.
-
argsort()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.argsort.
-
astype()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.astype.
-
byteswap()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.byteswap.
-
choose()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.choose.
-
clip()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.clip.
-
compress()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.compress.
-
conj()¶
-
conjugate()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.conjugate.
-
copy()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.copy.
-
cumprod()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.cumprod.
-
cumsum()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.cumsum.
-
diagonal()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.diagonal.
-
dump()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.dump.
-
dumps()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.dumps.
-
fill()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.fill.
-
flatten()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.flatten.
-
getfield()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.getfield.
-
item()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.item.
-
itemset()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.itemset.
-
max()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.max.
-
mean()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.mean.
-
min()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.min.
-
newbyteorder(new_order='S', /)¶ Return a new
dtypewith a different byte order.Changes are also made in all fields and sub-arrays of the data type.
The
new_ordercode can be any from the following:- ‘S’ - swap dtype from current to opposite endian
- {‘<’, ‘little’} - little endian
- {‘>’, ‘big’} - big endian
- ‘=’ - native order
- {‘|’, ‘I’} - ignore (no change to byte order)
Parameters: - new_order : str, optional
Byte order to force; a value from the byte order specifications above. The default value (‘S’) results in swapping the current byte order.
Returns: - new_dtype : dtype
New
dtypeobject with the given change to the byte order.
-
nonzero()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.nonzero.
-
prod()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.prod.
-
ptp()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.ptp.
-
put()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.put.
-
ravel()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.ravel.
-
repeat()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.repeat.
-
reshape()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.reshape.
-
resize()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.resize.
-
round()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.round.
-
searchsorted()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.searchsorted.
-
setfield()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.setfield.
-
setflags()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.setflags.
-
sort()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.sort.
-
squeeze()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.squeeze.
-
std()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.std.
-
sum()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.sum.
-
swapaxes()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.swapaxes.
-
take()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.take.
-
tobytes()¶
-
tofile()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.tofile.
-
tolist()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.tolist.
-
tostring()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.tostring.
-
trace()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.trace.
-
transpose()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.transpose.
-
var()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.var.
-
view()¶ Scalar method identical to the corresponding array attribute.
Please see
ndarray.view.
-