def asnumpy(self):
        """Copy the data from TCMPS into a new numpy ndarray"""

        # Create C variables that will serve as out parameters for TCMPS.
        data_ptr = _ctypes.POINTER(_ctypes.c_float)()    # float* data_ptr
        shape_ptr = _ctypes.POINTER(_ctypes.c_size_t)()  # size_t* shape_ptr
        dim = _ctypes.c_size_t()                         # size_t dim

        # Obtain pointers into memory owned by the C++ object self.handle.
        # Note that this may trigger synchronization with another thread
        # producing the data.
        status_code = self._LIB.TCMPSReadFloatArray(
            self.handle, _ctypes.byref(data_ptr), _ctypes.byref(shape_ptr),
            _ctypes.byref(dim))
        assert status_code == 0, "Error calling TCMPSReadFloatArray"

        return _numpy_array_from_ctypes(data_ptr, shape_ptr, dim)
Copy the data from TCMPS into a new numpy ndarray