pub unsafe fn as_slice(&self) -> Result<&[T], NotContiguousError> {
        if !self.is_contiguous() {
            Err(NotContiguousError)
        } else {
            Ok(slice::from_raw_parts(self.data(), self.len()))
        }
    }
/// Returns the immutable view of the internal data of `PyArray` as slice.
///
/// Please consider the use of safe alternatives
/// ([`PyReadonlyArray::as_slice`](../struct.PyReadonlyArray.html#method.as_slice)
/// , [`as_cell_slice`](#method.as_cell_slice) or [`to_vec`](#method.to_vec)) instead of this.
///
/// # Safety
/// If the internal array is not readonly and can be mutated from Python code,
/// holding the slice might cause undefined behavior.
Returns the immutable view of the internal data of `PyArray` as slice.
Returns the immutable view of the internal data of ` PyArray ` as slice .
pub unsafe fn as_slice(&self) -> Result<&[T], NotContiguousError> {
        if !self.is_contiguous() {
            Err(NotContiguousError)
        } else {
            Ok(slice::from_raw_parts(self.data(), self.len()))
        }
    }
pub unsafe fn as_slice ( & self ) -> Result < & [ T ] , NotContiguousError > { if ! self . is_contiguous ( ) { Err ( NotContiguousError ) } else { Ok ( slice :: from_raw_parts ( self . data ( ) , self . len ( ) ) ) } }
Returns the immutable view of the internal data of `PyArray` as slice.
Returns the immutable view of the internal data of ` PyArray ` as slice .
&self
safety
If the internal array is not readonly and can be mutated from Python code,
holding the slice might cause undefined behavior.
If the internal array is not readonly and can be mutated from Python code holding the slice might cause undefined behavior .