@@ -991,7 +991,7 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
991
991
///
992
992
/// # Safety
993
993
///
994
- /// The existence of an exclusive reference to the internal data, e.g. `&mut [T]` or `ArrayViewMut`, implies undefined behavior .
994
+ /// Calling this method invalidates all exclusive references to the internal data, e.g. `&mut [T]` or `ArrayViewMut`.
995
995
pub unsafe fn as_array ( & self ) -> ArrayView < ' _ , T , D > {
996
996
self . as_view ( |shape, ptr| ArrayView :: from_shape_ptr ( shape, ptr) )
997
997
}
@@ -1002,7 +1002,7 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
1002
1002
///
1003
1003
/// # Safety
1004
1004
///
1005
- /// The existence of another reference to the internal data, e.g. `&[T] ` or `ArrayView`, implies undefined behavior .
1005
+ /// Calling this method invalidates all other references to the internal data, e.g. `ArrayView ` or `ArrayViewMut` .
1006
1006
pub unsafe fn as_array_mut ( & self ) -> ArrayViewMut < ' _ , T , D > {
1007
1007
self . as_view ( |shape, ptr| ArrayViewMut :: from_shape_ptr ( shape, ptr) )
1008
1008
}
@@ -1105,7 +1105,7 @@ where
1105
1105
///
1106
1106
/// # Safety
1107
1107
///
1108
- /// The existence of an exclusive reference to the internal data, e.g. `&mut [T] ` or `ArrayViewMut`, implies undefined behavior .
1108
+ /// Calling this method invalidates all exclusive references to the internal data, e.g. `ArrayViewMut ` or `MatrixSliceMut` .
1109
1109
#[ doc( alias = "nalgebra" ) ]
1110
1110
pub unsafe fn try_as_matrix < R , C , RStride , CStride > (
1111
1111
& self ,
@@ -1127,7 +1127,7 @@ where
1127
1127
///
1128
1128
/// # Safety
1129
1129
///
1130
- /// The existence of another reference to the internal data, e.g. `&[T]` or `ArrayView `, implies undefined behavior .
1130
+ /// Calling this method invalidates all other references to the internal data, e.g. `ArrayView`, `MatrixSlice `, `ArrayViewMut` or `MatrixSliceMut` .
1131
1131
#[ doc( alias = "nalgebra" ) ]
1132
1132
pub unsafe fn try_as_matrix_mut < R , C , RStride , CStride > (
1133
1133
& self ,
0 commit comments