def test_valign(): data = dataset.load(sample.path('rot420px.h5'), grp='/', dset='data') res = align.valign(data) real = np.array([28.0*np.sin(i*np.pi/90.0) for i in range(91)]) assert_allclose(real, res, rtol=0, atol=0.2)
from xni import dataset from xni import sample import numpy as np data = dataset.load(sample.path('rot420px.h5'), dset='data', grp='/') #arr = np.zeros((3,3,3), dtype='f4') #arr = arr + 1 dataset.serve(data)