Bug 756358

Summary: python-numdisplay has been completely broken by changes to numpy
Product: [Fedora] Fedora Reporter: Anthony Horton <anthony.horton>
Component: python-numdisplayAssignee: Sergio Pascual <sergio.pasra>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: mmahut, sergio.pasra
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-numdisplay-1.5.6-4.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-05 00:27:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anthony Horton 2011-11-23 11:28:03 UTC
Description of problem:

There is an incompatibility between the version of NumPy in the Fedora 16 repos and python-numdisplay which prevents numdisplay from working at all.

A bug was filed upstream against numdisplay ( https://www.stsci.edu/trac/ssb/stsci_python/ticket/694 ) and a trivial fix applied to the development tree ( https://www.stsci.edu/trac/ssb/stsci_python/changeset/12315 ) however there have been no new upstream releases of numdisplay containing the fix.  The fix was added as version 1.6.1 but the last released version of numdisplay ( http://stsdas.stsci.edu/numdisplay/ ) is version 1.5.6.

Can this trivial fix be back-ported to the Fedora python-numdisplay package?  Numdisplay is completely unusable without it.


Version-Release number of selected component (if applicable):

python-numdisplay 1.5.6-3.fc15 
numpy.x86_64 1:1.6.0-2.1.fc16 


How reproducible: Always


Steps to Reproduce:
1. Call the numdisplay.display() method from within Python code/interpreter

  
Actual results:

A TypeError exception.  See full trace back under additional info below.


Expected results:

NumPy array is displayed in ds9 application.


Additional info:

In [27]: a = numpy.array([[2,1],[1,0]])

In [28]: numdisplay.display(a)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/ajh/Documents/imagestabilisation/measurements/FLI/20111123_red/<ipython-input-28-7fa318aa8fb1> in <module>()
----> 1 numdisplay.display(a)

/usr/lib/python2.7/site-packages/numdisplay/__init__.pyc in display(self, pix, name, bufname, z1, z2, transform, zscale, contrast, scale, offset, frame, quiet)
    399 
    400         # Initialize the specified frame buffer

--> 401         _d.setFrame(self.frame)
    402         _d.eraseFrame()
    403 

/usr/lib/python2.7/site-packages/numdisplay/displaydev.pyc in setFrame(self, frame_num)
    405 
    406         code = self._LUT | self._COMMAND
--> 407         self._writeHeader(self._IIS_WRITE, code, -1, 0, 0, 0, 0)
    408 
    409         # Update with user specified frame number


/usr/lib/python2.7/site-packages/numdisplay/displaydev.pyc in _writeHeader(self, tid, subunit, thingct, x, y, z, t)
    538         # Compute the checksum

    539         sum = n.add.reduce(a)
--> 540         sum = 0xffff - (sum & 0xffff)
    541         a[3] = sum
    542         self._write(a.tostring())

TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'

Comment 1 Sergio Pascual 2011-11-24 12:27:00 UTC
I will try to fix this as soon as possible

Comment 2 Fedora Update System 2011-11-24 22:53:17 UTC
python-numdisplay-1.5.6-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/python-numdisplay-1.5.6-4.fc16

Comment 3 Fedora Update System 2011-11-25 23:29:27 UTC
Package python-numdisplay-1.5.6-4.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-numdisplay-1.5.6-4.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16433/python-numdisplay-1.5.6-4.fc16
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-12-05 00:27:07 UTC
python-numdisplay-1.5.6-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.