2024-04-09 01:36:47 +00:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
import numpy as np
|
|
|
|
import dask.array as da
|
|
|
|
|
|
|
|
from numpydantic import interface
|
2024-04-23 02:31:56 +00:00
|
|
|
from tests.fixtures import hdf5_array
|
2024-04-09 01:36:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(
|
|
|
|
scope="function",
|
|
|
|
params=[
|
|
|
|
([[1, 2], [3, 4]], interface.NumpyInterface),
|
|
|
|
(np.zeros((3, 4)), interface.NumpyInterface),
|
2024-04-23 02:31:56 +00:00
|
|
|
(hdf5_array, interface.H5Interface),
|
2024-04-09 01:36:47 +00:00
|
|
|
(da.random.random((10, 10)), interface.DaskInterface),
|
|
|
|
],
|
2024-04-23 02:31:56 +00:00
|
|
|
ids=["numpy_list", "numpy", "H5ArrayPath", "dask"],
|
2024-04-09 01:36:47 +00:00
|
|
|
)
|
|
|
|
def interface_type(request):
|
|
|
|
return request.param
|