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

Class BoolValuesApi

numpy/core/code_generators/genapi.py:381–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379# Dummy to be able to consistently use *Api instances for all items in the
380# array api
381class BoolValuesApi:
382 def __init__(self, name, index, api_name):
383 self.name = name
384 self.index = index
385 self.type = 'PyBoolScalarObject'
386 self.api_name = api_name
387
388 def define_from_array_api_string(self):
389 return "#define %s ((%s *)%s[%d])" % (self.name,
390 self.type,
391 self.api_name,
392 self.index)
393
394 def array_api_define(self):
395 return " (void *) &%s" % self.name
396
397 def internal_define(self):
398 astr = """\
399extern NPY_NO_EXPORT PyBoolScalarObject _PyArrayScalar_BoolValues[2];
400"""
401 return astr
402
403class FunctionApi:
404 def __init__(self, name, index, annotations, return_type, args, api_name):

Callers 1

do_generate_apiFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected