diff --git a/.gitignore b/.gitignore index f65eca4..38677c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ -*~ +# CMake build and local install directory build/ -mkl_random/__pycache__/ -mkl_random/tests/__pycache__/ +mkl_random.egg-info/ + +# Byte-compiled / optimized / DLL files +__pycache__/ + +mkl_random/src/mklrand.c mkl_random/mklrand.cpp mkl_random/mklrand.cpython*.so -mkl_random.egg-info/ + diff --git a/LICENSE.txt b/LICENSE.txt index 85fa35f..f0eb281 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2017-2019, Intel Corporation +Copyright (c) 2017, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 1c80714..52b4ef5 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -## ``mkl_random`` -- a NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality +## `mkl_random` -- a NumPy-based Python interface to Intel® oneAPI Math Kernel Library (OneMKL) Random Number Generation functionality [![Conda package using conda-forge](https://github.com/IntelPython/mkl_random/actions/workflows/conda-package-cf.yml/badge.svg)](https://github.com/IntelPython/mkl_random/actions/workflows/conda-package-cf.yml) -`mkl_random` has started as Intel (R) Distribution for Python optimizations for NumPy. +`mkl_random` started as a part of Intel® Distribution for Python optimizations to NumPy. Per NumPy's community suggestions, voiced in https://github.com/numpy/numpy/pull/8209, it is being released as a stand-alone package. -Prebuilt `mkl_random` can be installed into conda environment from Intel's channel: +Prebuilt `mkl_random` can be installed into conda environment from Intel's channel using: ``` conda install -c https://software.repos.intel.com/python/conda mkl_random @@ -20,7 +20,7 @@ or from conda forge channel: --- -To install mkl_random Pypi package please use following command: +To install `mkl_random` PyPI package please use following command: ``` python -m pip install -i https://software.repos.intel.com/python/pypi --extra-index-url https://pypi.org/simple mkl_random @@ -38,7 +38,7 @@ Where `` should be the latest version from https://software.repos `mkl_random` is not fixed-seed backward compatible drop-in replacement for `numpy.random`, meaning that it implements sampling from the same distributions as `numpy.random`. -For distributions directly supported in Intel (R) Math Kernel Library (MKL), `method` keyword is supported: +For distributions directly supported in Intel® OneMKL, `method` keyword is supported: ``` mkl_random.standard_normal(size=(10**5, 10**3), method='BoxMuller') diff --git a/docs/source/tutorials.rst b/docs/source/tutorials.rst index 9c2d306..5b5b41c 100644 --- a/docs/source/tutorials.rst +++ b/docs/source/tutorials.rst @@ -22,7 +22,7 @@ The package :mod:`mkl_random` is available in `conda `_. +The :mod:`mkl_random` is also distributed as part of `Intel® Distribution for Python* `_. First steps ----------- diff --git a/mkl_random/__init__.py b/mkl_random/__init__.py index 51586c2..512027b 100644 --- a/mkl_random/__init__.py +++ b/mkl_random/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2017-2019, Intel Corporation +# Copyright (c) 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/_init_helper.py b/mkl_random/_init_helper.py index 3a4c1dd..973a11a 100644 --- a/mkl_random/_init_helper.py +++ b/mkl_random/_init_helper.py @@ -1,16 +1,27 @@ -# Copyright 2025 Intel Corporation +# Copyright (c) 2025 Intel Corporation # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: # -# http://www.apache.org/licenses/LICENSE-2.0 +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import os import os.path diff --git a/mkl_random/src/.gitignore b/mkl_random/src/.gitignore deleted file mode 100644 index 2174c73..0000000 --- a/mkl_random/src/.gitignore +++ /dev/null @@ -1 +0,0 @@ -mklrand.c diff --git a/mkl_random/src/mkl_distributions.cpp b/mkl_random/src/mkl_distributions.cpp index a1233c5..77910f6 100644 --- a/mkl_random/src/mkl_distributions.cpp +++ b/mkl_random/src/mkl_distributions.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2017-2024, Intel Corporation + Copyright (c) 2017, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/src/mkl_distributions.h b/mkl_random/src/mkl_distributions.h index 3322761..802d994 100644 --- a/mkl_random/src/mkl_distributions.h +++ b/mkl_random/src/mkl_distributions.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2017-2019, Intel Corporation + Copyright (c) 2017, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/src/numpy_multiiter_workaround.h b/mkl_random/src/numpy_multiiter_workaround.h index db6a325..808ae8c 100644 --- a/mkl_random/src/numpy_multiiter_workaround.h +++ b/mkl_random/src/numpy_multiiter_workaround.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2024-2024, Intel Corporation + Copyright (c) 2024, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/src/randomkit.cpp b/mkl_random/src/randomkit.cpp index 07fea0e..bacfcb7 100644 --- a/mkl_random/src/randomkit.cpp +++ b/mkl_random/src/randomkit.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2017-2024, Intel Corporation + Copyright (c) 2017, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/src/randomkit.h b/mkl_random/src/randomkit.h index 485e596..e01f187 100644 --- a/mkl_random/src/randomkit.h +++ b/mkl_random/src/randomkit.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2017-2019, Intel Corporation + Copyright (c) 2017, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/tests/__init__.py b/mkl_random/tests/__init__.py index 8b917bd..2e6a1fe 100644 --- a/mkl_random/tests/__init__.py +++ b/mkl_random/tests/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2017-2019, Intel Corporation +# Copyright (c) 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/tests/test_random.py b/mkl_random/tests/test_random.py index fc5ccfc..124fc29 100644 --- a/mkl_random/tests/test_random.py +++ b/mkl_random/tests/test_random.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2017-2019, Intel Corporation +# Copyright (c) 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/tests/test_regression.py b/mkl_random/tests/test_regression.py index eef5d62..a00e1c9 100644 --- a/mkl_random/tests/test_regression.py +++ b/mkl_random/tests/test_regression.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2017-2019, Intel Corporation +# Copyright (c) 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/setup.py b/setup.py index d23364c..130954a 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2017-2022, Intel Corporation +# Copyright (c) 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: