Python numexpr.set_num_threads() Examples

The following are 6 code examples of numexpr.set_num_threads(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module numexpr , or try the search function .
Example #1
Source File: expressions.py    From recruit with Apache License 2.0 5 votes vote down vote up
def set_numexpr_threads(n=None):
    # if we are using numexpr, set the threads to n
    # otherwise reset
    if _NUMEXPR_INSTALLED and _USE_NUMEXPR:
        if n is None:
            n = ne.detect_number_of_cores()
        ne.set_num_threads(n) 
Example #2
Source File: expressions.py    From vnpy_crypto with MIT License 5 votes vote down vote up
def set_numexpr_threads(n=None):
    # if we are using numexpr, set the threads to n
    # otherwise reset
    if _NUMEXPR_INSTALLED and _USE_NUMEXPR:
        if n is None:
            n = ne.detect_number_of_cores()
        ne.set_num_threads(n) 
Example #3
Source File: expressions.py    From Computable with MIT License 5 votes vote down vote up
def set_numexpr_threads(n=None):
    # if we are using numexpr, set the threads to n
    # otherwise reset
    if _NUMEXPR_INSTALLED and _USE_NUMEXPR:
        if n is None:
            n = ne.detect_number_of_cores()
        ne.set_num_threads(n) 
Example #4
Source File: expressions.py    From predictive-maintenance-using-machine-learning with Apache License 2.0 5 votes vote down vote up
def set_numexpr_threads(n=None):
    # if we are using numexpr, set the threads to n
    # otherwise reset
    if _NUMEXPR_INSTALLED and _USE_NUMEXPR:
        if n is None:
            n = ne.detect_number_of_cores()
        ne.set_num_threads(n) 
Example #5
Source File: expressions.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def set_numexpr_threads(n=None):
    # if we are using numexpr, set the threads to n
    # otherwise reset
    if _NUMEXPR_INSTALLED and _USE_NUMEXPR:
        if n is None:
            n = ne.detect_number_of_cores()
        ne.set_num_threads(n) 
Example #6
Source File: expressions.py    From elasticintel with GNU General Public License v3.0 5 votes vote down vote up
def set_numexpr_threads(n=None):
    # if we are using numexpr, set the threads to n
    # otherwise reset
    if _NUMEXPR_INSTALLED and _USE_NUMEXPR:
        if n is None:
            n = ne.detect_number_of_cores()
        ne.set_num_threads(n)