INNER CODE UNIT · Python

SexpVectorWithNumpyInterface

rpy2/rpy2 · rpy2-rinterface/src/rpy2/rinterface/__init__.py:388

class SexpVectorWithNumpyInterface(SexpVectorCCompatibleAbstract, SexpVector):
    """Numpy-specific API for accessing the content of a numpy array.

    This interface implements version 3 of Numpy's `__array_interface__`
    and is only available / possible for some of the R vectors."""

    @property
    @abc.abstractmethod
    def _NP_TYPESTR(self) -> str:
        pass

    @property
    def __array_interface__(
            self
    ) -> dict:
        """Return an `__array_interface__` version 3.

        Note that the pointer returned in the items 'data' corresponds to

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…