IntelPython / dpctl

Python SYCL bindings and SYCL-based Python Array API library
https://intelpython.github.io/dpctl/
Apache License 2.0
97 stars 29 forks source link

`tile` does not handle empty repetitions and scalar input as per array API #1627

Closed ndgrigorian closed 3 months ago

ndgrigorian commented 3 months ago

When tile is called on a scalar array with empty repetitions, it returns a 1D array instead of 0D (scalar)

>>> import dpctl,dpctl.tensor as dpt, numpy as np
>>> dpt.tile(dpt.asarray(5), ()).shape
(1,)

>>> np.tile(np.array(5), ()).shape
()