MCPcopy Index your code
hub / github.com/numpy/numpy / getmultilineblock

Function getmultilineblock

numpy/f2py/auxfuncs.py:667–693  ·  view source on GitHub ↗
(rout, blockname, comment=1, counter=0)

Source from the content-addressed store, hash-verified

665
666
667def getmultilineblock(rout, blockname, comment=1, counter=0):
668 try:
669 r = rout['f2pyenhancements'].get(blockname)
670 except KeyError:
671 return
672 if not r:
673 return
674 if counter > 0 and isinstance(r, str):
675 return
676 if isinstance(r, list):
677 if counter >= len(r):
678 return
679 r = r[counter]
680 if r[:3] == "'''":
681 if comment:
682 r = '\t/* start ' + blockname + \
683 ' multiline (' + repr(counter) + ') */\n' + r[3:]
684 else:
685 r = r[3:]
686 if r[-3:] == "'''":
687 if comment:
688 r = r[:-3] + '\n\t/* end multiline (' + repr(counter) + ')*/'
689 else:
690 r = r[:-3]
691 else:
692 errmess(f"{blockname} multiline block should end with `'''`: {repr(r)}\n")
693 return r
694
695
696def getcallstatement(rout):

Callers 5

getcallstatementFunction · 0.85
getcallprotoargumentFunction · 0.85
getusercodeFunction · 0.85
getusercode1Function · 0.85
getpymethoddefFunction · 0.85

Calls 2

errmessFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…