Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error in hncc_dnb composite test #875

Merged
merged 7 commits into from Aug 21, 2019

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Aug 12, 2019

Pull requests started failing on travis with the following error:

 File "/home/travis/build/pytroll/satpy/satpy/composites/viirs.py", line 1069, in _gain_factor
    gain[mask] = (58 + 4 / np.cos(np.deg2rad(theta[mask]))) / 5
IndexError: too many indices for array

This PR should fix this, although on my machine I got a different error for the same line of code.

  • Tests added and test suite added to parent suite
  • Tests passed
  • Passes flake8 satpy

@djhoese djhoese added the bug label Aug 12, 2019
@djhoese djhoese requested a review from mraspaud as a code owner August 12, 2019 14:47
@djhoese djhoese self-assigned this Aug 12, 2019
@djhoese
Copy link
Member Author

djhoese commented Aug 12, 2019

For the record, on my machine I got:

  File "/Users/davidh/repos/git/satpy/satpy/composites/viirs.py", line 1070, in _gain_factor
    gain[mask] = (58 + 4 / np.cos(np.deg2rad(theta[mask]))) / 5
  File "/Users/davidh/anaconda/envs/satpy_py37/lib/python3.7/site-packages/dask/array/core.py", line 1404, in __setitem__
    y = where(key, value, self)
  File "/Users/davidh/anaconda/envs/satpy_py37/lib/python3.7/site-packages/dask/array/routines.py", line 1223, in where
    return elemwise(np.where, condition, x, y)
  File "/Users/davidh/anaconda/envs/satpy_py37/lib/python3.7/site-packages/dask/array/core.py", line 3723, in elemwise
    broadcast_shapes(*shapes)
  File "/Users/davidh/anaconda/envs/satpy_py37/lib/python3.7/site-packages/dask/array/core.py", line 3684, in broadcast_shapes
    "shapes {0}".format(" ".join(map(str, shapes)))
ValueError: operands could not be broadcast together with shapes (5, 10) (nan,) (5, 10)

@mraspaud
Copy link
Member

Thanks for fixing this. I see this is still failing, is there anything more we can do about it ?

@djhoese
Copy link
Member Author

djhoese commented Aug 20, 2019

I'm restarting all the travis jobs. I'm still actively working with the ci-helpers people to fix things when using the new versions of conda. We are really close to getting stuff done, but most of the maintainers of that project don't have a lot of time this week.

My summary of working on ci-helpers: It has been long over due that it gets updated for modern conda/python/etc.

@djhoese djhoese merged commit ad3c549 into pytroll:master Aug 21, 2019
@djhoese djhoese deleted the bugfix-hncc-dnb-test branch August 21, 2019 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants