keras/src/backend/torch/core.py/Variable/__array__
class Variable:    def __array__(self, dtype=None):
        value = convert_to_numpy(self.value)
        if dtype:
            return value.astype(dtype)
        return value