Helper to check if object is a CuPy array (has __cuda_array_interface__)
| 256 | |
| 257 | // Helper to check if object is a CuPy array (has __cuda_array_interface__) |
| 258 | static bool isCupyArray(nanobind::object obj) { |
| 259 | return nanobind::hasattr(obj, "__cuda_array_interface__"); |
| 260 | } |
| 261 | |
| 262 | /// @brief Helper to get BufferInfo from a numpy array via Python buffer |
| 263 | /// protocol. |