本文整理匯總了Python中numpy.core.umath.UFUNC_BUFSIZE_DEFAULT屬性的典型用法代碼示例。如果您正苦於以下問題:Python umath.UFUNC_BUFSIZE_DEFAULT屬性的具體用法?Python umath.UFUNC_BUFSIZE_DEFAULT怎麽用?Python umath.UFUNC_BUFSIZE_DEFAULT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類numpy.core.umath
的用法示例。
在下文中一共展示了umath.UFUNC_BUFSIZE_DEFAULT屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_errobj_noerrmask
# 需要導入模塊: from numpy.core import umath [as 別名]
# 或者: from numpy.core.umath import UFUNC_BUFSIZE_DEFAULT [as 別名]
def test_errobj_noerrmask(self):
# errmask = 0 has a special code path for the default
olderrobj = np.geterrobj()
try:
# set errobj to something non default
np.seterrobj([umath.UFUNC_BUFSIZE_DEFAULT,
umath.ERR_DEFAULT + 1, None])
# call a ufunc
np.isnan(np.array([6]))
# same with the default, lots of times to get rid of possible
# pre-existing stack in the code
for i in range(10000):
np.seterrobj([umath.UFUNC_BUFSIZE_DEFAULT, umath.ERR_DEFAULT,
None])
np.isnan(np.array([6]))
finally:
np.seterrobj(olderrobj)
示例2: test_errobj_noerrmask
# 需要導入模塊: from numpy.core import umath [as 別名]
# 或者: from numpy.core.umath import UFUNC_BUFSIZE_DEFAULT [as 別名]
def test_errobj_noerrmask(self):
# errmask = 0 has a special code path for the default
olderrobj = np.geterrobj()
try:
# set errobj to something non default
np.seterrobj([umath.UFUNC_BUFSIZE_DEFAULT,
umath.ERR_DEFAULT + 1, None])
#call a ufunc
np.isnan(np.array([6]))
# same with the default, lots of times to get rid of possible
# pre-existing stack in the code
for i in range(10000):
np.seterrobj([umath.UFUNC_BUFSIZE_DEFAULT, umath.ERR_DEFAULT,
None])
np.isnan(np.array([6]))
finally:
np.seterrobj(olderrobj)