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

Speed up interpolation in ensemble_copula_coupling.ConvertProbabilitiesToPercentiles #1578

Merged
merged 46 commits into from
Nov 16, 2021
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e98c6fc
Add fast interpolation method
btrotta-bom Oct 7, 2021
a890d16
Style
btrotta-bom Oct 7, 2021
568bb8e
Add missing file
btrotta-bom Oct 7, 2021
cdb587e
Isort
btrotta-bom Oct 7, 2021
b629240
Style
btrotta-bom Oct 7, 2021
fec6a17
Style
btrotta-bom Oct 7, 2021
adfdcdd
Add licence and docstring
btrotta-bom Oct 7, 2021
514a1a5
Merge remote-tracking branch 'upstream/master' into fast-interpolate2
btrotta-bom Oct 7, 2021
df9f62d
Mock numba in sphinx autodoc
btrotta-bom Oct 7, 2021
6f6e387
Tell codecov to ignore numba_utilities.py
btrotta-bom Oct 7, 2021
24cf35c
Add more tests
btrotta-bom Oct 7, 2021
9bdd45b
Tell black to ignore import in test
btrotta-bom Oct 7, 2021
43af274
isort
btrotta-bom Oct 7, 2021
f8ba3ec
Add noqa for spurious black result
btrotta-bom Oct 7, 2021
7e68c9d
Remove unused code
btrotta-bom Oct 7, 2021
bc202ea
Fix bug
btrotta-bom Oct 7, 2021
f6a9d59
Remove warning test
btrotta-bom Oct 7, 2021
c34f6a9
Remove unused code
btrotta-bom Oct 7, 2021
7436dcb
Remove unused import
btrotta-bom Oct 7, 2021
9713b78
Fix imports
btrotta-bom Oct 7, 2021
b1c8add
Simplify code
btrotta-bom Oct 12, 2021
97a0f40
Add a test
btrotta-bom Oct 12, 2021
f2eaaff
Change method names to distinguish from functionality for other open PR
btrotta-bom Oct 13, 2021
20784f0
Update type hints
btrotta-bom Oct 13, 2021
867f37b
Add test
btrotta-bom Oct 13, 2021
e8249c2
Style
btrotta-bom Oct 13, 2021
501d71a
Calculate in 64-bit, output in 32-bit
btrotta-bom Nov 9, 2021
aaba6c0
Sort x
btrotta-bom Nov 9, 2021
d2339b0
Add simple tests with known result
btrotta-bom Nov 9, 2021
e404b77
Style
btrotta-bom Nov 9, 2021
5fd742d
Restore old code for handling unordered x
btrotta-bom Nov 9, 2021
75f88a0
Add input checking
btrotta-bom Nov 9, 2021
945a21b
Test correct version is used depending on numba
btrotta-bom Nov 10, 2021
b535a9b
Style
btrotta-bom Nov 10, 2021
91e9b9f
Fix imports
btrotta-bom Nov 10, 2021
ba624ad
Style
btrotta-bom Nov 10, 2021
7e24763
Fix mocking
btrotta-bom Nov 10, 2021
ad6c563
Cast result to float32
btrotta-bom Nov 11, 2021
62551b1
MAINT: Proposed review suggestions
cpelley Nov 12, 2021
f803c1c
Merge pull request #1 from cpelley/1578_SUGGESTED_REVIEW_CHANGES
btrotta-bom Nov 15, 2021
111f0a4
Merge
btrotta-bom Nov 16, 2021
34d0ba8
Fix merge
btrotta-bom Nov 16, 2021
25c41cd
Fix interpolate_multiple_rows_same_x to use same approach as interpol…
btrotta-bom Nov 16, 2021
7a30eb5
Style
btrotta-bom Nov 16, 2021
c380752
Isort
btrotta-bom Nov 16, 2021
2e56664
Fix comment
btrotta-bom Nov 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add licence and docstring
  • Loading branch information
btrotta-bom committed Oct 7, 2021
commit adfdcdd278569f2c68eb2c21109a3467acf9c263
36 changes: 36 additions & 0 deletions improver/ensemble_copula_coupling/numba_utilities.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
"""
This module defines the optional numba utilities for Ensemble Copula Coupling
plugins.

"""

import os

import numpy as np
Expand Down