[[ nan nan nan ... -8.23414666e-04
-5.94470800e-04 -3.51605759e-04]
[ nan nan nan ... -4.46161745e-04
-2.93301076e-04 -1.83216718e-04]
[ nan nan nan ... -2.04372700e-04
-1.43195490e-04 -9.47578434e-05]
...
[ nan nan nan ... -1.50316128e-05
-7.53571822e-05 -1.21192903e-04]
[ nan nan nan ... 4.58974279e-05
-4.22424439e-05 -8.68374244e-05]
[ nan nan nan ... 1.64187791e-04
-1.50739786e-05 -7.63359852e-05]]
I suspect your brh contains some kind of Python object representing an array, which isnan doesn’t know what to do with. Either you need to use some Python function for isnan on your object, or you need to convert it into a Julia Array so you can process it with Julia functions.
(No, I don’t know the details of either option, but conversion should be described in the PythonCall documentation, if that’s what you use to call Python.)
What package does the Py type come from? That’s probably the most important thing here — and it’d be good for you to understand why that’s the important thing.
You’re shuttling things back and forth between the two languages with one of the python interop packages. Thinking about just this one issue in isolation will likely just get you to the next section of code — which is exactly what happened with your previous question.
Instead of looking at these errors one-by-one, I’d encourage you to try to holistically dig into the conversionrules between the two languages in PythonCall.jl (I think that’s what you’re using) — and ask questions about the grand scheme!
that’s not a package, .jl is just a file extension for Julia source code.
The stacktrace snippet says plainly that the materialize method is part of Base, a base library that comes with Julia, not a package
Nowhere in that method signature suggests that the Py type comes from Base or its submodule Broadcast, and it does not. Use parentmodule for this instead.
you will most likely see that nothing has happened with the type. However, if you use the output from pyconvert you may have something that becomes more useful later on:
print(typeof(br))
x = pyconvert(Any,br)
print(typeof(x))