john-bodley commented on code in PR #21936: URL: https://github.com/apache/superset/pull/21936#discussion_r1004824179
########## superset/result_set.py: ########## @@ -63,8 +63,12 @@ def stringify(obj: Any) -> str: def stringify_values(array: np.ndarray) -> np.ndarray: - vstringify = np.vectorize(stringify) - return vstringify(array) + result = np.copy(array) + + for obj in np.nditer(result, flags=["refs_ok"], op_flags=["readwrite"]): + 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) sans the `with` block. -- 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]
