self.assertEqual(seq[-3:], eseq)E AssertionError: Seque[128 chars]: int32>
assert_series_almost_equal(actual, expected)skbio/diversity/tests/test_driver.py:260:
pdt.assert_series_equal(left, right,check_dtype=True,
assert_series_almost_equal(actual, expected)skbio/diversity/tests/test_driver.py:223:
pdt.assert_series_equal(left, right,check_dtype=True,
optimized = alpha_diversity('faith_pd', self.table1, tree=self.tree1,otu_ids=self.oids1) skbio/diversity/tests/test_driver.py:265:
Hi,
I think there are some remaining issues with numpy 1.24 migration on 32
bit architectures[1].
Here is one example:
_________ TestSequence.test_getitem_with_slice_has_positional_metadata _________
self = <skbio.sequence.tests.test_sequence.TestSequence testMethod=test_getitem_with_slice_has_positional_metadata>
def test_getitem_with_slice_has_positional_metadata(self):
s = "0123456789abcdef"
length = len(s)
seq = Sequence(s, metadata={'id': 'id3', 'description': 'dsc3'},
positional_metadata={'quality': np.arange(length)})
eseq = Sequence("012", metadata={'id': 'id3', 'description': 'dsc3'},
positional_metadata={'quality': np.arange(3)})
self.assertEqual(seq[0:3], eseq)
self.assertEqual(seq[:3], eseq)
self.assertEqual(seq[:3:1], eseq)
eseq = Sequence("def", metadata={'id': 'id3', 'description': 'dsc3'},
positional_metadata={'quality': [13, 14, 15]})
self.assertEqual(seq[-3:], eseq)E AssertionError: Seque[128 chars]: int32>
E Stats:
E length: 3
E ----------------[14 chars]0 def != Seque[128 chars]: int64>
E Stats:
E length: 3
E ----------------[14 chars]0 def
skbio/sequence/tests/test_sequence.py:748: AssertionError
How can I ensure that in both cases the arrays have the same type (I think it makes
no difference whether it is np.int32 or np.int64 as long as they are of same type.
Kind regards
Andreas.
[1] https://buildd.debian.org/status/package.php?p=python-skbio&suite=experimental
--
http://fam-tille.de
I made some tiny steps forward ("only" 84 failures instead of 89 when I
wrote my first mail) in the numpy 1.24 migration for 32bit architectures
but I'm facing issues I do not have a real clue for. In
https://salsa.debian.org/med-team/python-skbio/-/blob/master/debian/patches/numpy-1.24.patch#L123-L126
...
which obviosly[2] failed. I wonder whether someone might give some
hints how to get dtypes consistently to one integer representation which
is the background of nearly all these test suite issues.
[3]: https://buildd.debian.org/status/logs.php?pkg=python-skbio&arch=i386 [4]:https://buildd.debian.org/status/logs.php?pkg=python-skbio&arch=armhf[1] https://buildd.debian.org/status/package.php?p=python-skbio&suite=experimental[2] https://salsa.debian.org/med-team/python-skbio/-/jobs/3868951
On Mon, Jan 30, 2023 at 09:12:57AM +0100, Andreas Tille wrote:
I made some tiny steps forward ("only" 84 failures instead of 89 when I wrote my first mail) in the numpy 1.24 migration for 32bit architectures but I'm facing issues I do not have a real clue for. In
https://salsa.debian.org/med-team/python-skbio/-/blob/master/debian/patches/numpy-1.24.patch#L123-L126
Apologies for pointing the discussion into an orthogonal direction for
once. Ofcourse, we could try fixing these, but if you look closely, skbio
has never built on 32 bit archs ever since around 2016 on i386[3] and
it has never built on the rest of 32 bit ever since it entered debian[4]
and now this new upstream FTBFS that you point to, won't really block migration in any way.
So my question is this: Why are we trying hard to fix this on 32-bit _now_ given that the upstream support has never been solid for this package on 32-bit archs?
...
which obviosly[2] failed. I wonder whether someone might give some
hints how to get dtypes consistently to one integer representation which
is the background of nearly all these test suite issues.
I can think of two alternatives to fix this:
1. There are a few type conversions to "int" (.astype(int)) in the skbio source code.
This defaults to 32-bit integer type on 32-bit machines. Explicitly
casting them to 64-bit can fix this. I happened to write a similar patch
for another package recently, see[5] if it helps.
2. Just ignore datatypes while comparing pandas dataframes with
`check_dtype` parameter. An example/reference patch here[6]
[3]: https://buildd.debian.org/status/logs.php?pkg=python-skbio&arch=i386 [4]:https://buildd.debian.org/status/logs.php?pkg=python-skbio&arch=armhf [5]: https://salsa.debian.org/med-team/python-bioframe/-/blob/master/debian/patches/32-bits.patch[1] https://buildd.debian.org/status/package.php?p=python-skbio&suite=experimental[2] https://salsa.debian.org/med-team/python-skbio/-/jobs/3868951
[6]: https://salsa.debian.org/python-team/packages/python-upsetplot/-/blob/master/debian/patches/ignore-dtype-while-asserting.patch
--
Best,
Nilesh
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 384 |
Nodes: | 16 (2 / 14) |
Uptime: | 62:43:57 |
Calls: | 8,174 |
Calls today: | 6 |
Files: | 13,113 |
Messages: | 5,864,574 |