MCPcopy
hub / github.com/pandas-dev/pandas / _simple_new

Method _simple_new

pandas/core/arrays/sparse/array.py:509–519  ·  view source on GitHub ↗
(
        cls,
        sparse_array: np.ndarray,
        sparse_index: SparseIndex,
        dtype: SparseDtype,
    )

Source from the content-addressed store, hash-verified

507
508 @classmethod
509 def _simple_new(
510 cls,
511 sparse_array: np.ndarray,
512 sparse_index: SparseIndex,
513 dtype: SparseDtype,
514 ) -> Self:
515 new = object.__new__(cls)
516 new._sparse_index = sparse_index
517 new._sparse_values = sparse_array
518 new._dtype = dtype
519 return new
520
521 @classmethod
522 def from_spmatrix(cls, data: _SparseMatrixLike) -> Self:

Callers 12

fillnaMethod · 0.95
copyMethod · 0.95
astypeMethod · 0.95
__array_ufunc__Method · 0.95
_to_datetimearrayMethod · 0.45
_to_timedeltaarrayMethod · 0.45
from_spmatrixMethod · 0.45
from_spmatrixMethod · 0.45
isnaMethod · 0.45
__getitem__Method · 0.45
_take_without_fillMethod · 0.45
_unary_methodMethod · 0.45

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected