Skip to content

Commit

Permalink
use nanmedian
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez committed Oct 12, 2023
1 parent 257399f commit 80f6d50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Build python package

on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -33,11 +36,13 @@ jobs:
CIBW_TEST_SKIP: '*-macosx_arm64'

- uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build sdist
if: github.event_name == 'push'
runs-on: ubuntu-latest

steps:
Expand All @@ -56,8 +61,9 @@ jobs:
with:
path: ./dist/*.tar.gz

upload_all:
if: github.repository == 'Nixtla/coreforecast'
upload_artifacts:
name: 'Upload to PyPI'
if: github.repository == 'Nixtla/coreforecast' && startsWith(github.ref, 'refs/tags/v')
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scalers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def robust_scaler_iqr_stats(x):

def robust_scaler_mad_stats(x):
median = np.nanmedian(x)
mad = np.median(np.abs(x - median))
mad = np.nanmedian(np.abs(x - median))
return median, mad


Expand Down

0 comments on commit 80f6d50

Please sign in to comment.