# Support new casting requirements in NumPy 1.10

XMLWordPrintable

## Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
1
• Sprint:
Science Pipelines DM-W16-2
• Team:

## Description

The function imagesDiffer() in testUtils attempts to OR an array of unit16s (LHS) against an array of bools(RHS) valSkipMaskArr |= skipMaskArr and errors with message

 TypeError: ufunc 'bitwise_or' output (typecode 'H') could not be coerced to provided output parameter (typecode '?') according to the casting rule ''same_kind'' 

preventing afw from building correctly.

## Activity

Hide
Russell Owen added a comment -

I merged afw and coadd_utils, but we are also seeing the same problem in obs_lsstSim tests/testLsstSimIsrTask.py:

  File "/Users/rowen/LSST/lsstsw/build/obs_lsstSim/python/lsst/obs/lsstSim/lsstSimIsrTask.py", line 81, in saturationInterpolation  self.unmaskSatHotPixels(ccdExposure)  File "/Users/rowen/LSST/lsstsw/build/obs_lsstSim/python/lsst/obs/lsstSim/lsstSimIsrTask.py", line 70, in unmaskSatHotPixels  maskarr[idx] &= andMask TypeError: ufunc 'bitwise_and' output (typecode 'i') could not be coerced to provided output parameter (typecode 'H') according to the casting rule ''same_kind'' 

Show
Russell Owen added a comment - I merged afw and coadd_utils, but we are also seeing the same problem in obs_lsstSim tests/testLsstSimIsrTask.py: File "/Users/rowen/LSST/lsstsw/build/obs_lsstSim/python/lsst/obs/lsstSim/lsstSimIsrTask.py", line 81, in saturationInterpolation self.unmaskSatHotPixels(ccdExposure) File "/Users/rowen/LSST/lsstsw/build/obs_lsstSim/python/lsst/obs/lsstSim/lsstSimIsrTask.py", line 70, in unmaskSatHotPixels maskarr[idx] &= andMask TypeError: ufunc 'bitwise_and' output (typecode 'i') could not be coerced to provided output parameter (typecode 'H') according to the casting rule ''same_kind''
Hide
Russell Owen added a comment -

Could you please also look at obs_lsstSim tickets/DM-4063? A change much like the others.

At this point all of lsst_apps builds for me. I tried building lsst_sims but a package hung for no obvious reason (though I would be surprised if it had anything to do with the numpy change) and I don't have time to diagnose it yet.

Show
Russell Owen added a comment - Could you please also look at obs_lsstSim tickets/ DM-4063 ? A change much like the others. At this point all of lsst_apps builds for me. I tried building lsst_sims but a package hung for no obvious reason (though I would be surprised if it had anything to do with the numpy change) and I don't have time to diagnose it yet.
Hide
Tim Jenness added a comment -

The obs_lsstSim change is like the others so seems fine for now. Thanks.

Show
Tim Jenness added a comment - The obs_lsstSim change is like the others so seems fine for now. Thanks.
Hide
Russell Owen added a comment -

I merged obs_lsstSim. At this point all of lsst_apps builds for on my Mac using numpy 1.10 and Peter Yoachim has kindly agreed to take up any issues in sims packages using a different ticket.

Show
Russell Owen added a comment - I merged obs_lsstSim. At this point all of lsst_apps builds for on my Mac using numpy 1.10 and Peter Yoachim has kindly agreed to take up any issues in sims packages using a different ticket.
Hide
Vishal Kasliwal [X] (Inactive) added a comment -

I can confirm that all of lsst_apps builds on ubuntu.

Show
Vishal Kasliwal [X] (Inactive) added a comment - I can confirm that all of lsst_apps builds on ubuntu.

## People

• Assignee:
Russell Owen
Reporter:
Vishal Kasliwal [X] (Inactive)
Reviewers:
Tim Jenness
Watchers:
John Swinbank, Russell Owen, Tim Jenness, Vishal Kasliwal [X] (Inactive)