Exemplo n.º 1
0
 def sem(self, axis=None, dtype=None, out=None, ddof=1, keepdims=False,
         skipna=True):
     nv.validate_stat_ddof_func((), dict(dtype=dtype, out=out,
                                         keepdims=keepdims),
                                fname='sem')
     return nanops.nansem(self._ndarray, axis=axis, skipna=skipna,
                          ddof=ddof)
Exemplo n.º 2
0
 def std(
     self,
     *,
     axis: int | None = None,
     dtype: NpDtype | None = None,
     out=None,
     ddof=1,
     keepdims: bool = False,
     skipna: bool = True,
 ):
     nv.validate_stat_ddof_func((), {
         "dtype": dtype,
         "out": out,
         "keepdims": keepdims
     },
                                fname="std")
     result = nanops.nanstd(self._ndarray,
                            axis=axis,
                            skipna=skipna,
                            ddof=ddof)
     return self._wrap_reduction_result(axis, result)
Exemplo n.º 3
0
    def std(
        self,
        axis=None,
        dtype=None,
        out=None,
        ddof: int = 1,
        keepdims: bool = False,
        skipna: bool = True,
    ):
        nv.validate_stat_ddof_func((),
                                   dict(dtype=dtype,
                                        out=out,
                                        keepdims=keepdims),
                                   fname="std")
        if not len(self):
            return NaT
        if not skipna and self._hasnans:
            return NaT

        result = nanops.nanstd(self._data, axis=axis, skipna=skipna, ddof=ddof)
        return Timedelta(result)
Exemplo n.º 4
0
 def sem(
     self,
     *,
     axis=None,
     dtype: Optional[NpDtype] = None,
     out=None,
     ddof=1,
     keepdims=False,
     skipna=True,
 ):
     nv.validate_stat_ddof_func((), {
         "dtype": dtype,
         "out": out,
         "keepdims": keepdims
     },
                                fname="sem")
     result = nanops.nansem(self._ndarray,
                            axis=axis,
                            skipna=skipna,
                            ddof=ddof)
     return self._wrap_reduction_result(axis, result)
Exemplo n.º 5
0
    def std(
        self,
        axis=None,
        dtype=None,
        out=None,
        ddof: int = 1,
        keepdims: bool = False,
        skipna: bool = True,
    ):
        nv.validate_stat_ddof_func((),
                                   dict(dtype=dtype,
                                        out=out,
                                        keepdims=keepdims),
                                   fname="std")

        result = nanops.nanstd(self._ndarray,
                               axis=axis,
                               skipna=skipna,
                               ddof=ddof)
        if axis is None or self.ndim == 1:
            return self._box_func(result)
        return self._from_backing_data(result)
Exemplo n.º 6
0
    def std(
        self,
        *,
        axis=None,
        dtype: Optional[NpDtype] = None,
        out=None,
        ddof: int = 1,
        keepdims: bool = False,
        skipna: bool = True,
    ):
        nv.validate_stat_ddof_func((), {
            "dtype": dtype,
            "out": out,
            "keepdims": keepdims
        },
                                   fname="std")

        result = nanops.nanstd(self._ndarray,
                               axis=axis,
                               skipna=skipna,
                               ddof=ddof)
        if axis is None or self.ndim == 1:
            return self._box_func(result)
        return self._from_backing_data(result)
Exemplo n.º 7
0
 def skew(self, axis=None, dtype=None, out=None, keepdims=False, skipna=True):
     nv.validate_stat_ddof_func(
         (), dict(dtype=dtype, out=out, keepdims=keepdims), fname="skew"
     )
     return nanops.nanskew(self._ndarray, axis=axis, skipna=skipna)
Exemplo n.º 8
0
 def skew(self, *, axis=None, dtype=None, out=None, keepdims=False, skipna=True):
     nv.validate_stat_ddof_func(
         (), {"dtype": dtype, "out": out, "keepdims": keepdims}, fname="skew"
     )
     result = nanops.nanskew(self._ndarray, axis=axis, skipna=skipna)
     return self._wrap_reduction_result(axis, result)