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


Groups > linux.debian.bugs.rc > #232779

Bug#899205: 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 Andreas Tille <andreas@an3as.eu>
Newsgroups linux.debian.bugs.rc
Subject Bug#899205: 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 09:10 +0200
Message-ID <vXegp-2q2-5@gated-at.bofh.it> (permalink)
References <vRCv7-cf-3@gated-at.bofh.it> <vRCv7-cf-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Control: tags -1 help

Hi,

I have reported the issue upstream but no response so far.  While the
error message contains some hint how to solve the issue I would like
to backup this by some competent advise.


======================================================================
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.

======================================================================


I would be happy for some suggested patch how to solve this.  The line
in question is

   https://salsa.debian.org/med-team/python-cogent/blob/master/cogent/core/sequence.py

   Line 1251

If my feeling is not totally wrong the correct patch would be 

   valid_indices -= (self._data == i)

since the left value is rather an integer than boolean.

What do you think?

Kind regards

        Andreas.

-- 
http://fam-tille.de

Back to linux.debian.bugs.rc | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Bug#899205: 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) Andreas Tille <andreas@an3as.eu> - 2018-06-05 09:10 +0200
  Bug#899205: 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) Daniele Nicolodi <daniele@grinta.net> - 2018-06-05 17:00 +0200

csiph-web