# Fix ndarray compiler warnings

XMLWordPrintable

#### Details

• Type: Improvement
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
1
• Sprint:
AP S18-6
• Team:

#### Description

Fix ndarray compiler warnings in the few remaining packages that have not been updated.

This consists of removing

  if (_import_array() < 0) {  PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import");  return nullptr;  } 

and import of numpy headers from pybind11 wrappers

#### Activity

Hide
Russell Owen added a comment - - edited

I also took the opportunity to tweak flake8 testing as follows:

• enable automatic flake8 testing for meas_extensions_simpleShape (which had very few flake8 errors, so this was trivial)
• finish enabling scons flake8 testing in meas_modelfit; the config files were there but tests/SConstruct had not been updated
• finish enabling flake8 testing in shapelet; setup.cfg was there, but scons was not running flake8 and the Travis file was missing and there were a few flake8 errors
Show
Russell Owen added a comment - - edited I also took the opportunity to tweak flake8 testing as follows: enable automatic flake8 testing for meas_extensions_simpleShape (which had very few flake8 errors, so this was trivial) finish enabling scons flake8 testing in meas_modelfit ; the config files were there but tests/SConstruct had not been updated finish enabling flake8 testing in shapelet ; setup.cfg was there, but scons was not running flake8 and the Travis file was missing and there were a few flake8 errors
Hide
Nate Lust added a comment -

I see no problems beside a question I brought up on slack, but that would be a ticket in its own (pending how the discussion goes) so I see no reason to hold this up.

Show
Nate Lust added a comment - I see no problems beside a question I brought up on slack, but that would be a ticket in its own (pending how the discussion goes) so I see no reason to hold this up.
Hide
Nate Lust added a comment -

The only question I really did have is that you enabled flake8 testing with scons. Was this ever part of an rfc? Not that I personally have a problem with doing this, but some people might have their own workflows and might not want want to be interrupted with this. It may be that the rfc just passed me by, as I dont always catch everything going on.

Show
Nate Lust added a comment - The only question I really did have is that you enabled flake8 testing with scons. Was this ever part of an rfc? Not that I personally have a problem with doing this, but some people might have their own workflows and might not want want to be interrupted with this. It may be that the rfc just passed me by, as I dont always catch everything going on.
Hide
Russell Owen added a comment -

It's a standard part of our workflow. We've been adapting packages as we come to them.

in this case the flake8 config file was already present and it was likely an oversight that pyList=[] had not been added to tests/SConscript

Show
Russell Owen added a comment - It's a standard part of our workflow. We've been adapting packages as we come to them. in this case the flake8 config file was already present and it was likely an oversight that pyList=[] had not been added to tests/SConscript
Hide
Tim Jenness added a comment -
Show

#### People

Assignee:
Russell Owen
Reporter:
Russell Owen
Reviewers:
Nate Lust
Watchers:
Nate Lust, Russell Owen, Tim Jenness