标题:Python错误和异常
只看楼主
xiaoyuner
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2020-9-9
结帖率:0
 问题点数:0 回复次数:0 
Python错误和异常


"""
Array methods which are called by both the C-code for the method
and the Python code for the NumPy-namespace function

"""
from __future__ import division, absolute_import, print_function

import warnings

from numpy.core import multiarray as mu
from numpy.core import umath as um
from numpy.core._asarray import asanyarray
from numpy.core import numerictypes as nt
from numpy.core import _exceptions
from numpy._globals import _NoValue
from import pickle, os_fspath, contextlib_nullcontext

# save those O(100) nanoseconds!
umr_maximum = um.maximum.reduce
umr_minimum = um.minimum.reduce
umr_sum = um.add.reduce
umr_prod = um.multiply.reduce
umr_any = um.logical_or.reduce
umr_all = um.logical_and.reduce

# avoid keyword arguments to speed up parsing, saves about 15%-20% for very
# small reductions
def _amax(a, axis=None, out=None, keepdims=False,
          initial=_NoValue, where=True):
    return umr_maximum(a, axis, None, out, keepdims, initial, where)

def _amin(a, axis=None, out=None, keepdims=False,
          initial=_NoValue, where=True):
    return umr_minimum(a, axis, None, out, keepdims, initial, where)

def _sum(a, axis=None, dtype=None, out=None, keepdims=False,
         initial=_NoValue, where=True):
    return umr_sum(a, axis, dtype, out, keepdims, initial, where)   #line38
  
报错:TypeError: float() argument must be a string or a number, not '_NoValueType'
搜索更多相关主题的帖子: from out initial where import 
2020-10-12 15:15



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-503442-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.218580 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved