MCPcopy Create free account
hub / github.com/NanoComp/meep / get_num_args

Function get_num_args

python/simulation.py:96–102  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

94
95
96def get_num_args(func):
97 if isinstance(func, Harminv) or isinstance(func, PadeDFT):
98 return 2
99 elif inspect.ismethod(func):
100 return func.__code__.co_argcount - 1 # remove 'self' from count
101 else:
102 return func.__code__.co_argcount
103
104
105def vec(*args):

Callers 3

run_parityMethod · 0.90
apply_band_func_thunkFunction · 0.90
_eval_step_funcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected