Skip to content

Commit

Permalink
Merge pull request #125 from IntelPython/reinstate-init
Browse files Browse the repository at this point in the history
Reinstate import_array in _pydfti
  • Loading branch information
oleksandr-pavlyk authored Oct 16, 2024
2 parents 8431635 + d0b5362 commit fd1f790
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build_pip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions mkl_fft/_pydfti.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down

0 comments on commit fd1f790

Please sign in to comment.