Scalar¶
- class lsst.analysis.tools.Scalar¶
-
This 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
Scalar attribute identical to the corresponding array attribute.
Scalar attribute identical to the corresponding array attribute.
Pointer to start of data.
Get array data-descriptor.
The integer value of flags.
A 1-D view of the scalar.
The imaginary part of the scalar.
The length of one element in bytes.
The length of the scalar in bytes.
The number of array dimensions.
The real part of the scalar.
Tuple of array dimensions.
The number of elements in the gentype.
Tuple of bytes steps in each dimension.
Methods Summary
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
newbyteorder
([new_order])Return a new
dtype
with a different byte order.Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar 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
dtype
with a different byte order.Changes are also made in all fields and sub-arrays of the data type.
The
new_order
code can be any from the following:‘S’ - swap dtype from current to opposite endian
{‘<’, ‘little’} - little endian
{‘>’, ‘big’} - big endian
{‘=’, ‘native’} - native order
{‘|’, ‘I’} - ignore (no change to byte order)
- Parameters:
- new_orderstr, 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_dtypedtype
New
dtype
object 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
.