Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #10612 > unrolled thread

Re: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead (Was: Bug#899205: python-cogent: Test suite fails with latest matplotlib)

Started byStuart Prescott <stuart@debian.org>
First post2018-06-05 17:30 +0200
Last post2018-06-05 17:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.maint.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead (Was: Bug#899205: python-cogent: Test suite fails with latest matplotlib) Stuart Prescott <stuart@debian.org> - 2018-06-05 17:30 +0200

#10612 — Re: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead (Was: Bug#899205: python-cogent: Test suite fails with latest matplotlib)

FromStuart Prescott <stuart@debian.org>
Date2018-06-05 17:30 +0200
SubjectRe: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead (Was: Bug#899205: python-cogent: Test suite fails with latest matplotlib)
Message-ID<vXm4h-7gs-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi Andreas,

> ======================================================================
> ERROR: test_consistent_gap_degen_handling
> (test_core.test_sequence.ModelSequenceTests) gap degen character should be
> treated consistently
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
>   "/tmp/autopkgtest-
lxc.5a99fnj6/downtmp/autopkgtest_tmp/tests/test_core/test_sequence.py",
>   line 660, in test_consistent_gap_degen_handling
>     self.assertEqual(dna.stripBadAndGaps(), raw_ungapped)
>   File "/usr/lib/python2.7/dist-packages/cogent/core/sequence.py", line
>   1251, in stripBadAndGaps
>     valid_indices -= self._data == i
> TypeError: numpy boolean subtract, the `-` operator, is deprecated, use
> the bitwise_xor, the `^` operator, or the logical_xor function instead.
> 
> ======================================================================

The error message basically describes the solution -- patch attached. Quite 
what the original meaning of "bool - bool" was supposed to be is hard to 
discern (and that is why numpy has deprecated it). You should get upstream 
to look at this carefully.

Note that there is more than one test that fails like this. There also may 
be other places depending on how good their test coverage is.

There are also failing doctests; a patch for them also attached, permitting 
the test to work with both old and new numpy.

These two patches only get the package to compile though. Lintian will then 
tell you about other RC bugs that you need to fix prior to upload.

regards
Stuart


-- 
Stuart Prescott    http://www.nanonanonano.net/   stuart@nanonanonano.net
Debian Developer   http://www.debian.org/         stuart@debian.org
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7

[toc] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web