diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f5872299c573dba2a058e6dfb0de52c7c41f5b7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Earth Sciences + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/diagonals/moc.py b/diagonals/moc.py index e8c3c95a7ebe745fea6e88b667a32218c4a2c7ad..211d62edaa9f8561ab86c03bb64773b293bde344 100644 --- a/diagonals/moc.py +++ b/diagonals/moc.py @@ -41,7 +41,7 @@ def compute(basins, e1v, e3v, vo): if diagonals.CONFIG.use_gpu: moc = _compute_moc_gpu( vo, area - ) + ) else: moc = _compute_moc_cpu( vo, area @@ -180,7 +180,7 @@ def _vertical_cumsum(moc, out): moc: float32 Masked array containing the moc index for a given basin. """ - for lev in reversed(range(moc.shape[1]-1)): + for lev in range(moc.shape[1] - 2, -1, -1): moc[:, lev, :] = moc[:, lev, :] + moc[:, lev+1, :] diff --git a/setup.py b/setup.py index 7efa2532da67e42daf9a34e6228d60c50e8aef3c..e2bae3e835e23b02447adcba46105b725f7ed85b 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ REQUIREMENTS = { setup(name='diagonals', - version='0.2.0', + version='0.2.1', description='Compute diagnostics targeting the CPU or the GPU', url='https://earth.bsc.es/gitlab/es/diagonals', author='BSC-CNS Earth Sciences Department',