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


Groups > linux.debian.maint.python > #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)

From Stuart Prescott <stuart@debian.org>
Newsgroups linux.debian.maint.python, linux.debian.devel.mentors
Followup-To gmane.linux.debian.devel.python
Subject 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)
Date 2018-06-05 17:30 +0200
Message-ID <vXm4h-7gs-3@gated-at.bofh.it> (permalink)
References <vRCv7-cf-3@gated-at.bofh.it> <vXegp-2q2-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Followups directed to: gmane.linux.debian.devel.python

Show all headers | View raw


[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

Back to linux.debian.maint.python | Previous | Next | Find similar | Unroll thread


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) Stuart Prescott <stuart@debian.org> - 2018-06-05 17:30 +0200

csiph-web