MCPcopy Create free account
hub / github.com/numpy/numpy / _clean_args

Function _clean_args

numpy/core/defchararray.py:73–87  ·  view source on GitHub ↗

Helper function for delegating arguments to Python string functions. Many of the Python string operations that have optional arguments do not use 'None' to indicate a default value. In these cases, we need to remove all None arguments, and those following them.

(*args)

Source from the content-addressed store, hash-verified

71
72
73def _clean_args(*args):
74 """
75 Helper function for delegating arguments to Python string
76 functions.
77
78 Many of the Python string operations that have optional arguments
79 do not use 'None' to indicate a default value. In these cases,
80 we need to remove all None arguments, and those following them.
81 """
82 newargs = []
83 for chk in args:
84 if chk is None:
85 break
86 newargs.append(chk)
87 return newargs
88
89def _get_num_chars(a):
90 """

Callers 15

countFunction · 0.85
decodeFunction · 0.85
encodeFunction · 0.85
endswithFunction · 0.85
findFunction · 0.85
indexFunction · 0.85
replaceFunction · 0.85
rfindFunction · 0.85
rindexFunction · 0.85
rsplitFunction · 0.85
splitFunction · 0.85
splitlinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected