Python numpy.ctypeslib.load_library() Examples

The following are code examples for showing how to use numpy.ctypeslib.load_library(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: LaserTOF   Author: kyleuckert   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 2
Project: LaserTOF   Author: kyleuckert   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 3
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 4
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 5
Project: recruit   Author: Frank-qlu   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 6
Project: recruit   Author: Frank-qlu   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 7
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            cdll = load_library('multiarray',
                                np.core.multiarray.__file__)
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 8
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        """Regression for #801: load_library with a full library name
        (including extension) does not work."""
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                cdll = load_library('multiarray%s' % so,
                                    np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 9
Project: FUTU_Stop_Loss   Author: BigtoC   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 10
Project: FUTU_Stop_Loss   Author: BigtoC   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 11
Project: MARRtino-2.0   Author: DaniAffCH   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 12
Project: MARRtino-2.0   Author: DaniAffCH   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 13
Project: auto-alt-text-lambda-api   Author: abhisuri97   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 14
Project: auto-alt-text-lambda-api   Author: abhisuri97   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 15
Project: vnpy_crypto   Author: birforce   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 16
Project: vnpy_crypto   Author: birforce   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 17
Project: ble5-nrf52-mac   Author: tomasero   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 18
Project: ble5-nrf52-mac   Author: tomasero   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 19
Project: Computable   Author: ktraunmueller   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            cdll = load_library('multiarray',
                                np.core.multiarray.__file__)
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 20
Project: Computable   Author: ktraunmueller   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        """Regression for #801: load_library with a full library name
        (including extension) does not work."""
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                cdll = load_library('multiarray%s' % so,
                                    np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 21
Project: poker   Author: surgebiswas   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 22
Project: poker   Author: surgebiswas   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 23
Project: P3_image_processing   Author: latedude2   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 24
Project: P3_image_processing   Author: latedude2   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 25
Project: GraphicDesignPatternByPython   Author: Relph1119   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 26
Project: GraphicDesignPatternByPython   Author: Relph1119   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 27
Project: 3dprinteros-client   Author: panasevychol   File: test_ctypeslib.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            cdll = load_library('multiarray',
                                np.core.multiarray.__file__)
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 28
Project: 3dprinteros-client   Author: panasevychol   File: test_ctypeslib.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        """Regression for #801: load_library with a full library name
        (including extension) does not work."""
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                cdll = load_library('multiarray%s' % so,
                                    np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 29
Project: 3dprinteros-client   Author: panasevychol   File: test_ctypeslib.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            cdll = load_library('multiarray',
                                np.core.multiarray.__file__)
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 30
Project: 3dprinteros-client   Author: panasevychol   File: test_ctypeslib.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        """Regression for #801: load_library with a full library name
        (including extension) does not work."""
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                cdll = load_library('multiarray%s' % so,
                                    np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 31
Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 32
Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 33
Project: fund   Author: Frank-qlu   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 34
Project: fund   Author: Frank-qlu   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 35
Project: pySINDy   Author: luckystarufo   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 36
Project: pySINDy   Author: luckystarufo   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 37
Project: linear_neuron   Author: uglyboxer   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 38
Project: linear_neuron   Author: uglyboxer   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 39
Project: facethin   Author: ParkerGod   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 40
Project: facethin   Author: ParkerGod   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 41
Project: islam-buddy   Author: hamir   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 42
Project: islam-buddy   Author: hamir   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 43
Project: mxnet-lambda   Author: awslabs   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 44
Project: mxnet-lambda   Author: awslabs   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 45
Project: Deribit_funding_rate_indicator   Author: Dimasik007   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 46
Project: Deribit_funding_rate_indicator   Author: Dimasik007   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 47
Project: psychrometric-chart-makeover   Author: buds-lab   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 48
Project: psychrometric-chart-makeover   Author: buds-lab   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 49
Project: wine-ml-on-aws-lambda   Author: pierreant   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 50
Project: wine-ml-on-aws-lambda   Author: pierreant   File: test_ctypeslib.py    Apache License 2.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 51
Project: linux-cross-gcc   Author: nmercier   File: test_ctypeslib.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 52
Project: linux-cross-gcc   Author: nmercier   File: test_ctypeslib.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 53
Project: SignLanguage_ML   Author: mareep-raljodid   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 54
Project: SignLanguage_ML   Author: mareep-raljodid   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 55
Project: ImageFusion   Author: pfchai   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            cdll = load_library('multiarray',
                                np.core.multiarray.__file__)
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 56
Project: ImageFusion   Author: pfchai   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        """Regression for #801: load_library with a full library name
        (including extension) does not work."""
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                cdll = load_library('multiarray%s' % so,
                                    np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 57
Project: sarah   Author: ChonchoFronto   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 58
Project: sarah   Author: ChonchoFronto   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 59
Project: honours_project   Author: JFriel   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 60
Project: honours_project   Author: JFriel   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 61
Project: honours_project   Author: JFriel   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 62
Project: honours_project   Author: JFriel   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 63
Project: Blackjack-Tracker   Author: martinabeleda   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 64
Project: Blackjack-Tracker   Author: martinabeleda   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 65
Project: PYPIC   Author: max614   File: test_ctypeslib.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 66
Project: PYPIC   Author: max614   File: test_ctypeslib.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 67
Project: PYPIC   Author: max614   File: test_ctypeslib.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 68
Project: PYPIC   Author: max614   File: test_ctypeslib.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 69
Project: PYPIC   Author: max614   File: test_ctypeslib.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 70
Project: senior-design   Author: james-tate   File: test_ctypeslib.py    GNU General Public License v2.0 5 votes vote down vote up
def test_basic(self):
        try:
            cdll = load_library('multiarray',
                                np.core.multiarray.__file__)
        except ImportError, e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print msg 
Example 71
Project: senior-design   Author: james-tate   File: test_ctypeslib.py    GNU General Public License v2.0 5 votes vote down vote up
def test_basic2(self):
        """Regression for #801: load_library with a full library name
        (including extension) does not work."""
        try:
            try:
                from distutils import sysconfig
                so = sysconfig.get_config_var('SO')
                cdll = load_library('multiarray%s' % so,
                                    np.core.multiarray.__file__)
            except ImportError:
                print "No distutils available, skipping test."
        except ImportError, e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print msg 
Example 72
Project: offlow   Author: satwikkansal   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 73
Project: offlow   Author: satwikkansal   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 74
Project: lambda-tensorflow-object-detection   Author: mikylucky   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 75
Project: lambda-tensorflow-object-detection   Author: mikylucky   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('_multiarray_umath%s' % so, np.core._multiarray_umath.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 76
Project: elasticintel   Author: securityclippy   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('multiarray', np.core.multiarray.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 77
Project: elasticintel   Author: securityclippy   File: test_ctypeslib.py    GNU General Public License v3.0 5 votes vote down vote up
def test_basic2(self):
        # Regression for #801: load_library with a full library name
        # (including extension) does not work.
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                # Should succeed
                load_library('multiarray%s' % so, np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg) 
Example 78
Project: cnidaria   Author: sauloal   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            cdll = load_library('multiarray',
                                np.core.multiarray.__file__)
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 79
Project: cnidaria   Author: sauloal   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic2(self):
        """Regression for #801: load_library with a full library name
        (including extension) does not work."""
        try:
            try:
                so = get_shared_lib_extension(is_python_ext=True)
                cdll = load_library('multiarray%s' % so,
                                    np.core.multiarray.__file__)
            except ImportError:
                print("No distutils available, skipping test.")
        except ImportError as e:
            msg = "ctypes is not available on this python: skipping the test" \
                  " (import error was: %s)" % str(e)
            print(msg) 
Example 80
Project: AutoDraw   Author: yemi-Jump   File: test_ctypeslib.py    MIT License 5 votes vote down vote up
def test_basic(self):
        try:
            # Should succeed
            load_library('_multiarray_umath', np.core._multiarray_umath.__file__)
        except ImportError as e:
            msg = ("ctypes is not available on this python: skipping the test"
                   " (import error was: %s)" % str(e))
            print(msg)