Jul-09-2020, 06:29 AM
(Jul-09-2020, 05:37 AM)ndc85430 Wrote: Remember that ndarray objects can contain objects of basically any other type, so it's up to the programmer to know what type is in them and how to deal with them. Therefore, you have to go over all of the items and do your printing as you are, or transform the ndarray of Qs into an ndarray of whatever type Q.s is. With Python lists, you'd use map or, like you say, a list comprehension to do that transformation, but I don't know the API for ndarray well enough to know which method to use (there doesn't seem to be a map).
Thanks for the advice. I'm going to have to chew on that for a while and do some more RTFM. I discovered numpy.nditer for iterating over an ndarray, but there are issues specifying just the Q.s member of each element of the gx.g ndarray while ignoring the Q.qs member.
I'll reply again after I do more research.
Peter