Detail: IndexNanosecondGO: Accessor Values

Overview: IndexNanosecondGO: Accessor Values

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

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

InterfaceValues.apply(func, *args, **kwargs)[source]
>>> ix = sf.IndexNanosecondGO(('1789-05-05', '1789-12-31', '1799-11-09'))
>>> ix
<IndexNanosecondGO>
1789-05-05T00:00:00.000000000
1789-12-31T00:00:00.000000000
1799-11-09T00:00:00.000000000
<datetime64[ns]>
>>> ix.via_values.apply(np.sin)
TypeError("ufunc 'sin' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
IndexNanosecondGO.via_values.__array_ufunc__(ufunc, method, *args, **kwargs)
IndexNanosecondGO.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.

>>> ix = sf.IndexNanosecondGO(('1789-05-05', '1789-12-31', '1799-11-09'))
>>> ix
<IndexNanosecondGO>
1789-05-05T00:00:00.000000000
1789-12-31T00:00:00.000000000
1799-11-09T00:00:00.000000000
<datetime64[ns]>
>>> np.sin(ix.via_values)
TypeError("ufunc 'sin' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
IndexNanosecondGO.via_values.__call__(*, consolidate_blocks, unify_blocks, dtype)
IndexNanosecondGO.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.IndexNanosecondGO(('1789-05-05', '1789-12-31', '1799-11-09'))
>>> ix
<IndexNanosecondGO>
1789-05-05T00:00:00.000000000
1789-12-31T00:00:00.000000000
1799-11-09T00:00:00.000000000
<datetime64[ns]>
>>> np.sin(ix.via_values(unify_blocks=True))
TypeError("ufunc 'sin' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")

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