Skip to content

Commit fd1f790

Browse files
Merge pull request #125 from IntelPython/reinstate-init
Reinstate import_array in _pydfti
2 parents 8431635 + d0b5362 commit fd1f790

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/build_pip.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
- uses: conda-incubator/setup-miniconda@v3
3535
with:
3636
use-mamba: true
37-
miniforge-variant: Mambaforge
3837
miniforge-version: latest
3938
channels: conda-forge
4039
activate-environment: test

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## ``mkl_fft`` -- a NumPy-based Python interface to Intel (R) MKL FFT functionality
2-
[![Build Status](https://travis-ci.com/IntelPython/mkl_fft.svg?branch=master)](https://travis-ci.com/IntelPython/mkl_fft)
2+
[![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)
3+
[![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)
4+
[![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)
35

46
`mkl_fft` started as a part of Intel (R) Distribution for Python* optimizations to NumPy, and is now being released
57
as a stand-alone package. It can be installed into conda environment using

mkl_fft/_pydfti.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ cdef extern from "src/mklfft.h":
137137
char * mkl_dfti_error(int)
138138

139139

140+
# Initialize numpy
141+
cdef int numpy_import_status = cnp.import_array()
142+
if numpy_import_status < 0:
143+
raise ImportError("Failed to import NumPy as dependency of mkl_fft")
144+
145+
140146
cdef int _datacopied(cnp.ndarray arr, object orig):
141147
"""
142148
Strict check for `arr` not sharing any data with `original`,

0 commit comments

Comments
 (0)