From 6029108b43e3e513ff6eea66f5dd8fc86ec2050a Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 15 Oct 2024 09:41:36 -0500 Subject: [PATCH 1/3] Reinstate call to import_array This inserts call to initialize function pointer struct during initialization of _pydfti extension, and helps build mkl_fft with Cython <3 --- mkl_fft/_pydfti.pyx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mkl_fft/_pydfti.pyx b/mkl_fft/_pydfti.pyx index 23364be7..b20c7bd6 100644 --- a/mkl_fft/_pydfti.pyx +++ b/mkl_fft/_pydfti.pyx @@ -137,6 +137,12 @@ cdef extern from "src/mklfft.h": char * mkl_dfti_error(int) +# Initialize numpy +cdef int numpy_import_status = cnp.import_array() +if numpy_import_status < 0: + raise ImportError("Failed to import NumPy as dependency of mkl_fft") + + cdef int _datacopied(cnp.ndarray arr, object orig): """ Strict check for `arr` not sharing any data with `original`, From 0b924187c8c8bbb24f43b0987f231cf0ddace4ce Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 15 Oct 2024 09:46:34 -0500 Subject: [PATCH 2/3] Update badges on README --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5eeb2518..50910a8d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## ``mkl_fft`` -- a NumPy-based Python interface to Intel (R) MKL FFT functionality -[![Build Status](https://travis-ci.com/IntelPython/mkl_fft.svg?branch=master)](https://travis-ci.com/IntelPython/mkl_fft) +[![Conda package](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package.yml/badge.svg)](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package.yml) +[![Editable build using pip and pre-release NumPy](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yaml/badge.svg)](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yaml) +[![Conda package with conda-forge channel only](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package-cf.yml/badge.svg)](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package-cf.yml) `mkl_fft` started as a part of Intel (R) Distribution for Python* optimizations to NumPy, and is now being released as a stand-alone package. It can be installed into conda environment using From d0b5362125785204a566ab580de0b7d3c36b97cf Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 15 Oct 2024 09:53:06 -0500 Subject: [PATCH 3/3] Remove use of deprecated Mambaforge --- .github/workflows/build_pip.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_pip.yaml b/.github/workflows/build_pip.yaml index 6600317b..ea262d10 100644 --- a/.github/workflows/build_pip.yaml +++ b/.github/workflows/build_pip.yaml @@ -34,7 +34,6 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: use-mamba: true - miniforge-variant: Mambaforge miniforge-version: latest channels: conda-forge activate-environment: test