You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever trx-python is build on a s390x builder (big endian), below tests fail. Tests are run without dipy being installed, which also appears to have some endianness related issues, but it's not used here.
With dipy installed I see additional tests failing. But I suppose, without having analyzed, those would be related to dipy's endianness issues and need to be fixed there.
I saw the discussion in #4 and would like to add that Fedora aims to support s390x whenever possible.
Test failures on s390x
===================================FAILURES===================================_______________________________test_seq_ops_trx_______________________________deftest_seq_ops_trx():
withTemporaryDirectory() astmp_dir:
gs_dir=os.path.join(get_home(), 'gold_standard')
path=os.path.join(gs_dir, 'gs.trx')
trx_1=tmm.load(path)
>tmm.save(trx_1, os.path.join(tmp_dir, 'tmp.trx'))
trx/tests/test_io.py:53:
________________________________________
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:547: insavecopy_trx.resize()
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:1229: inresizetrx._copy_fixed_arrays_from(self)
________________________________________self=<trx.trx_file_memmap.TrxFileobjectat0x3ff371065d0>trx=<trx.trx_file_memmap.TrxFileobjectat0x3ff37106490>, strs_start=0pts_start=0, nb_strs_to_copy=Nonedef_copy_fixed_arrays_from(
self,
trx: Type["TrxFile"],
strs_start: int=0,
pts_start: int=0,
nb_strs_to_copy: Optional[int] =None,
) ->Tuple[int, int]:
"""Fill a TrxFile using another and start indexes (preallocation) Keyword arguments: trx -- TrxFile to copy data from strs_start -- The start index of the streamline pts_start -- The start index of the point nb_strs_to_copy -- The number of streamlines to copy. If not set will copy all Returns A tuple representing the end of the copied streamlines and end of copied points """ifnb_strs_to_copyisNone:
curr_strs_len, curr_pts_len=trx._get_real_len()
else:
curr_strs_len=int(nb_strs_to_copy)
curr_pts_len=np.sum(trx.streamlines._lengths[0:curr_strs_len])
curr_pts_len=int(curr_pts_len)
strs_end=strs_start+curr_strs_lenpts_end=pts_start+curr_pts_lenifcurr_pts_len==0:
returnstrs_start, pts_start# Mandatory arrays>self.streamlines._data[pts_start:pts_end] = \
trx.streamlines._data[0:curr_pts_len]
EValueError: couldnotbroadcastinputarrayfromshape (104,3) intoshape (4294967400,3)
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:872: ValueError_________________________test_concatenate[small.trx] __________________________path='/builddir/build/BUILD/python-trx-python-0.3-build/trx-python-0.3/tests/memmap_test_data/small.trx'@pytest.mark.parametrize("path", [("small.trx")])deftest_concatenate(path):
path=os.path.join(get_home(), 'memmap_test_data', path)
trx1=tmm.load(path)
trx2=tmm.load(path)
concat=tmm.concatenate([trx1, trx2])
>assertlen(concat) ==2*len(trx2)
Eassert0== (2*1000)
E+where0=len(<trx.trx_file_memmap.TrxFileobjectat0x3ff36dbc390>)
E+and1000=len(<trx.trx_file_memmap.TrxFileobjectat0x3ff371fb150>)
trx/tests/test_memmap.py:191: AssertionError____________________________test_resize[small.trx] ____________________________path='/builddir/build/BUILD/python-trx-python-0.3-build/trx-python-0.3/tests/memmap_test_data/small.trx'@pytest.mark.parametrize("path", [("small.trx")])deftest_resize(path):
path=os.path.join(get_home(), 'memmap_test_data', path)
trx1=tmm.load(path)
concat=tmm.TrxFile(nb_vertices=1000000, nb_streamlines=10000,
init_as=trx1)
tmm.concatenate([concat, trx1], preallocation=True, delete_groups=True)
concat.resize()
>assertlen(concat) ==len(trx1)
Eassert0==1000E+where0=len(<trx.trx_file_memmap.TrxFileobjectat0x3ff371b9860>)
E+and1000=len(<trx.trx_file_memmap.TrxFileobjectat0x3ff372af950>)
trx/tests/test_memmap.py:207: AssertionError_________________________test_append[small.trx-10000] _________________________path='/builddir/build/BUILD/python-trx-python-0.3-build/trx-python-0.3/tests/memmap_test_data/small.trx'buffer=10000@pytest.mark.parametrize("path, buffer", [ ("small.trx", 10000), ("small.trx", 0) ] )deftest_append(path, buffer):
path=os.path.join(get_home(), 'memmap_test_data', path)
trx1=tmm.load(path)
concat=tmm.TrxFile(nb_vertices=1, nb_streamlines=1,
init_as=trx1)
concat.append(trx1, extra_buffer=buffer)
ifbuffer>0:
concat.resize()
>assertlen(concat) ==len(trx1)
Eassert0==1000E+where0=len(<trx.trx_file_memmap.TrxFileobjectat0x3ff36e35fd0>)
E+and1000=len(<trx.trx_file_memmap.TrxFileobjectat0x3ff36e30230>)
trx/tests/test_memmap.py:229: AssertionError___________________test_append_Tractogram[small.trx-10000] ____________________path='/builddir/build/BUILD/python-trx-python-0.3-build/trx-python-0.3/tests/memmap_test_data/small.trx'buffer=10000@pytest.mark.parametrize("path, buffer", [("small.trx", 10000)])deftest_append_Tractogram(path, buffer):
path=os.path.join(get_home(), 'memmap_test_data', path)
trx=tmm.load(path)
obj=trx.to_tractogram()
concat=tmm.TrxFile(nb_vertices=1, nb_streamlines=1, init_as=trx)
>concat.append(obj, extra_buffer=buffer)
trx/tests/test_memmap.py:258:
________________________________________
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:1322: inappendobj=self.from_tractogram(obj, reference=self.header,
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:1649: infrom_tractogramsave(trx, tmp_dir.name)
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:546: insavecopy_trx=trx.deepcopy()
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:762: indeepcopyto_dump=_append_last_offsets(self.streamlines._offsets,
________________________________________nib_offsets=memmap([ 0, 2233785415175766016, 7710162562058289152,
10592466323575406592, 12754194144713...
13223412930889908224, 15457198346065674240, 541557855191302144,
2054767329987788800], dtype=uint64)
nb_vertices=33886def_append_last_offsets(nib_offsets: np.ndarray, nb_vertices: int) ->np.ndarray:
"""AppendsthelastelementofoffsetsfromheaderinformationKeywordarguments:
nib_offsets--np.ndarrayArrayofoffsetswiththelastelementbeingthestartofthelaststreamline (nibabelconvention)
nb_vertices--intTotalnumberofverticesinthestreamlinesReturns:
Offsets--np.ndarray (VTKconvention)
"""defis_sorted(a): returnnp.all(a[:-1] <=a[1:])
ifnotis_sorted(nib_offsets):
>raiseValueError('Offsets must be sorted values.')
EValueError: Offsetsmustbesortedvalues.
../BUILDROOT/usr/lib/python3.13/site-packages/trx/trx_file_memmap.py:47: ValueError
The text was updated successfully, but these errors were encountered:
Whenever
trx-python
is build on as390x
builder (big endian), below tests fail. Tests are run withoutdipy
being installed, which also appears to have some endianness related issues, but it's not used here.With
dipy
installed I see additional tests failing. But I suppose, without having analyzed, those would be related todipy
's endianness issues and need to be fixed there.I saw the discussion in #4 and would like to add that Fedora aims to support
s390x
whenever possible.Test failures on s390x
The text was updated successfully, but these errors were encountered: