Skip to content

Commit 2e77a5c

Browse files
committed
doc: Remove VNL NumPy view examples
These are not supported because copies are required
1 parent c9bb156 commit 2e77a5c

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎docs/code/MixingITKAndNumPy.py‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,16 @@
3232
# Save result
3333
itk.imwrite(itk_np_view, output_filename)
3434

35-
# Vnl matrix[View] from array
35+
# Vnl matrix from array
3636
arr = np.zeros([3,3], np.uint8)
37-
matrix_view = itk.GetVnlMatrixViewFromArray(arr)
3837
matrix = itk.GetVnlMatrixFromArray(arr)
3938

40-
# Array[View] from Vnl matrix
41-
arr_view = itk.GetArrayViewFromVnlMatrix(matrix)
39+
# Array from Vnl matrix
4240
arr = itk.GetArrayFromVnlMatrix(matrix)
4341

44-
# Vnl vector[View] from array
42+
# Vnl vector from array
4543
vec = np.zeros([3], np.uint8)
46-
vnl_vector_view = itk.GetVnlVectorViewFromArray(vec)
4744
vnl_vector = itk.GetVnlVectorFromArray(vec)
4845

49-
# Array[View] from Vnl vector
50-
vec_view = itk.GetArrayViewFromVnlVector(vnl_vector)
46+
# Array from Vnl vector
5147
vec = itk.GetArrayFromVnlVector(vnl_vector)

0 commit comments

Comments
 (0)