Recently, I revisited this thread for dealing with NumericArrays produced via numpy where numpy.nan will be embedded as NAN`,
which can be simply generated using the following code:
cNaN = ExternalEvaluate["Python",
"import numpy as np; np.array([np.nan])"] // Normal // First
And I found a caveat in Barry's approach that a number ...
I have found through a lot of iterations that the easiest and most reliable way of doing this is to pass the images using Base64 strings.
I have included example functions for sending and retrieving images using Mathematica .NETLink. The .NETLink built in function for retrieving images (EvaluateToImage) seems to re-encode the image.
Once the image is back in ...