john-bodley commented on code in PR #21936: URL: https://github.com/apache/superset/pull/21936#discussion_r1004825386
########## superset/result_set.py: ########## @@ -63,8 +63,14 @@ def stringify(obj: Any) -> str: def stringify_values(array: np.ndarray) -> np.ndarray: - vstringify = np.vectorize(stringify) - return vstringify(array) + result = np.copy(array) + + + with np.nditer(result, flags=["refs_ok"], op_flags=["readwrite"]) as it: + for obj in it: + obj[...] = stringify(obj) Review Comment: I've never come across the `...` in the context of Numpy before, but this logic was lifted from their [official documentation](https://numpy.org/doc/stable/reference/arrays.nditer.html#modifying-array-values). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
