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

Update Numpy to Version 1.23.2 #52

Closed
wants to merge 22 commits into from
Closed
Changes from 15 commits
Commits
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
78 changes: 42 additions & 36 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% set version = "1.23.1" %}
{% set version = "1.23.2" %}

package:
name: numpy_and_numpy_base
version: {{ version }}

source:
url: https://github.com/numpy/numpy/releases/download/v{{ version }}/numpy-{{ version }}.tar.gz
sha256: d748ef349bfef2e1194b59da37ed5a29c19ea8d7e6342019921ba2ba4fd8b624
sha256: b78d00e48261fbbd04aa0d7427cf78d18401ee0abd89c7559bbf422e5b1c7d01
patches:
- patches/0001-Obtain-and-prefer-custom-gfortran-from-env-variable.patch
- patches/0002-intel_mkl-version.patch # [blas_impl == "mkl"]
Expand All @@ -19,13 +19,15 @@ build:
number: 0
# numpy 1.20.0 no longer supports Python 3.6: https://numpy.org/doc/stable/release/1.20.0-notes.html
# "The Python versions supported for this release are 3.7-3.9, support for Python 3.6 has been dropped"
# numpy 1.21.x set Python upper bound <3.11, see https://github.com/numpy/numpy/commit/1e8d6a83985f3191c63963414981743adc4353cf
skip: True # [(blas_impl == 'openblas' and win) or py<38]
force_use_keys:
- python

requirements:
build:
- python # added for testing
- cython # added for testing
- setuptools # added for testing
- patch # [not win]
- m2-patch # [win]

Expand Down Expand Up @@ -61,6 +63,17 @@ outputs:
# If only_build_numpy_base: "yes", build numpy-base only; otherwise build all the outputs.
{% if only_build_numpy_base != 'yes' %}
test:
# requires was added in order to test the dependencies
requires:
- pytest # added for testing
- pytest-timeout # added for testing
- pytest-xdist # added for testing
- cffi # added for testing
- cython # added for testing
- hypothesis # added for testing
- pytz # added for testing
- setuptools <60.0.0 # added for testing
- typing_extensions # added for testing
commands:
- test -e $SP_DIR/numpy/distutils/site.cfg # [unix]
- IF NOT EXIST %SP_DIR%\numpy\distutils\site.cfg exit 1 # [win]
Expand Down Expand Up @@ -95,12 +108,23 @@ outputs:
# - mkl_umath # [blas_impl == 'mkl']
{% endif %}
{% set tests_to_skip = "_not_a_real_test" %}
# Seems to fail with current version of blas for large numbers
# https://github.com/conda-forge/numpy-feedstock/pull/179#issuecomment-569591828
{% set tests_to_skip = tests_to_skip + " or test_sincos_float32" %} # [linux64]
# Flawed test when using MKL
# https://github.com/numpy/numpy/issues/16769
{% set tests_to_skip = tests_to_skip + " or test_overrides" %} # [blas_impl == 'mkl']
# Only the complex256 system is failing, but I don't know how to skip it on its own
# https://github.com/numpy/numpy/issues/15243
{% set tests_to_skip = tests_to_skip + " or test_loss_of_precision" %} # [ppc64le or aarch64 or s390x]
# see: https://github.com/numpy/numpy/issues/20637
# failure to raise FloatingPointError on osx for reciprocal
# {% set tests_to_skip = tests_to_skip + " or test_unary_PyUFunc_O_O_method_full[reciprocal]" %} # [osx]
# Arrays are not equal?:
# E x: array(2.236068, dtype=float32)
# E y: array(2.236068, dtype=float32)
#{% set tests_to_skip = tests_to_skip + " or test_scalar_coercion_same_as_cast_and_assignment[float32]" %} # [ppc64le]
#{% set tests_to_skip = tests_to_skip + " or test_memory_store" %} # [ppc64le]
#
# {% set tests_to_skip = tests_to_skip + " or test_scalar_coercion_same_as_cast_and_assignment[float32]" %} # [ppc64le]
# {% set tests_to_skip = tests_to_skip + " or test_memory_store" %} # [ppc64le]
# any test that uses `sys.executable` has a chance to fail...
# this seems to be the related cause: https://github.com/conda/conda/issues/8305
# essentially older kernel versions + overlayfs = chance for corruption?
Expand All @@ -109,43 +133,25 @@ outputs:
{% set tests_to_skip = tests_to_skip + " or test_full_reimport" %} # [ppc64le or s390x]
{% set tests_to_skip = tests_to_skip + " or test_pep338" %} # [ppc64le or s390x]
{% set tests_to_skip = tests_to_skip + " or test_no_typing_extensions" %} # [ppc64le or s390x]
# 2022/5/5: E AssertionError: (131, 1.54987431981169249551435343964035e-09, 4.0035173453529620614007210953362e-19, 'arcsinh')
# Flawed test when using MKL
# https://github.com/numpy/numpy/issues/16769
{% set tests_to_skip = tests_to_skip + " or test_overrides" %} # [blas_impl == 'mkl']
# https://github.com/numpy/numpy/issues/15243
{% set tests_to_skip = tests_to_skip + " or test_loss_of_precision" %} # [s390x or ppc64le]
# It should be fixed by https://github.com/numpy/numpy/issues/20426
# but it still fails on some platforms.
{% set tests_to_skip = tests_to_skip + " or test_new_policy" %} # [s390x or ppc64le or (osx and arm64)]
# On osx-arm64: FAILED core/tests/test_limited_api.py::test_limited_api - subprocess.CalledProcessor
{% set tests_to_skip = tests_to_skip + " or test_limited_api" %} # [osx and arm64]
# ?
{% set tests_to_skip = tests_to_skip + " or test_gcd_overflow" %} # [s390x]
# ?
{% set tests_to_skip = tests_to_skip + " or test_herm_cases" %} # [osx and arm64]
{% set tests_to_skip = tests_to_skip + " or test_generalized_herm_cases" %} # [osx and arm64]
# ?
{% set tests_to_skip = tests_to_skip + " or test_partial_iteration_cleanup" %} # [osx or win64]

test:
requires:
- pip # force installation or `test_api_importable` will fail
- cython >=0.29.30,<3.0
- wheel
- setuptools <60.0.0
- pytest
- hypothesis
- {{ compiler('c') }} # [not osx]
- {{ compiler('cxx') }} # [not osx]
- {{ compiler('fortran') }} # [not osx]
- nomkl # [x86 and blas_impl != 'mkl']
- pytest
- pytz
- pytest-cov
- cffi # [py<310]
- mypy
- typing_extensions
commands:
- f2py -h
- python -c "import numpy; numpy.show_config()"
- export OPENBLAS_NUM_THREADS=1 # [unix]
- set OPENBLAS_NUM_THREADS=1 # [win]
- pytest -vvv --pyargs numpy -k "not ({{ tests_to_skip }})" --durations=0
- pip check
imports:
- numpy
- numpy
- numpy.core.multiarray
- numpy.core.numeric
- numpy.core.umath
Expand All @@ -155,12 +161,12 @@ outputs:
about:
home: https://numpy.org/
license: BSD-3-Clause
lisense_family: BSD
license_family: BSD
license_file: LICENSE.txt
summary: Array processing for numbers, strings, records, and objects.
description: |
NumPy is the fundamental package needed for scientific computing with Python.
doc_url: https://docs.scipy.org/doc/numpy/reference/
doc_url: https://numpy.org/doc/stable/reference/
dev_url: https://github.com/numpy/numpy
doc_source_url: https://github.com/numpy/numpy/tree/master/doc

Expand Down