Returns numpy arrays from any compatible backend
(*args)
| 230 | |
| 231 | |
| 232 | def to_numpy(*args): |
| 233 | """Returns numpy arrays from any compatible backend""" |
| 234 | |
| 235 | if len(args) == 1: |
| 236 | return get_backend(args[0]).to_numpy(args[0]) |
| 237 | else: |
| 238 | return [get_backend(a).to_numpy(a) for a in args] |
| 239 | |
| 240 | |
| 241 | class Backend: |