Detail: IndexGO: Accessor ValuesΒΆ

Overview: IndexGO: Accessor Values

IndexGO.via_values.apply(func, *args, **kwargs)
IndexGO.via_values

Interface for applying functions to values (as arrays) in this container.

InterfaceValues.apply(func, *args, **kwargs)[source]
>>> ix = sf.IndexGO((0, 1024, -2048, 4096))
>>> ix.via_values.apply(np.sin)
<IndexGO>
0.0
-0.15853338004399595
0.31305701279012343
-0.5946419876082146
<float64>
IndexGO.via_values.__array_ufunc__(ufunc, method, *args, **kwargs)
IndexGO.via_values

Interface for applying functions to values (as arrays) in this container.

InterfaceValues.__array_ufunc__(ufunc, method, *args, **kwargs)[source]

Support for applying NumPy functions directly on containers, returning NumPy arrays.

>>> ix = sf.IndexGO((0, 1024, -2048, 4096))
>>> np.sin(ix.via_values)
<IndexGO>
0.0
-0.15853338004399595
0.31305701279012343
-0.5946419876082146
<float64>
IndexGO.via_values.__call__(*, consolidate_blocks, unify_blocks, dtype)
IndexGO.via_values

Interface for applying functions to values (as arrays) in this container.

InterfaceValues.__call__(*, consolidate_blocks=False, unify_blocks=False, dtype=None)[source]
Parameters
  • consolidate_blocks – Group adjacent same-typed arrays into 2D arrays.

  • unify_blocks – Group all arrays into single array, re-typing to an appropriate dtype.

  • dtype – specify a dtype to be used in conversion before consolidation or unification, and before function application.

>>> ix = sf.IndexGO((0, 1024, -2048, 4096))
>>> np.sin(ix.via_values(unify_blocks=True))
<IndexGO>
0.0
-0.15853338004399595
0.31305701279012343
-0.5946419876082146
<float64>

IndexGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Regular Expression | Accessor Hashlib