Better way to convert to numpy array? #175
Answered
by
crisluengo
Abhijit-2592
asked this question in
General
-
Currently to convert a PyDIP image to numpy array I use the following
Is there a better way to do it? |
Beta Was this translation helpful? Give feedback.
Answered by
crisluengo
Apr 10, 2018
Replies: 1 comment
-
You can cast a
Note that casting a Numpy array to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
crisluengo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can cast a
dip.Image
tonp.array
using thenp.asarray
function, and the reverse using thedip.Image
constructor. But you don't necessarily need to do this. You can use adip.Image
as input to any Numpy function, and anynp.array
as input to any PyDIP function.Note that casting …