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

Function get_io_paths

numpy/f2py/tests/test_f2py2e.py:38–69  ·  view source on GitHub ↗

Takes in a temporary file for testing and returns the expected output and input paths Here expected output is essentially one of any of the possible generated files. ..note:: Since this does not actually run f2py, none of these are guaranteed to exist, and module nam

(fname_inp, mname="untitled")

Source from the content-addressed store, hash-verified

36
37
38def get_io_paths(fname_inp, mname="untitled"):
39 """Takes in a temporary file for testing and returns the expected output and input paths
40
41 Here expected output is essentially one of any of the possible generated
42 files.
43
44 ..note::
45
46 Since this does not actually run f2py, none of these are guaranteed to
47 exist, and module names are typically incorrect
48
49 Parameters
50 ----------
51 fname_inp : str
52 The input filename
53 mname : str, optional
54 The name of the module, untitled by default
55
56 Returns
57 -------
58 genp : NamedTuple PPaths
59 The possible paths which are generated, not all of which exist
60 """
61 bpath = Path(fname_inp)
62 return PPaths(
63 finp=bpath.with_suffix(".f"),
64 f90inp=bpath.with_suffix(".f90"),
65 pyf=bpath.with_suffix(".pyf"),
66 wrap77=bpath.with_name(f"{mname}-f2pywrappers.f"),
67 wrap90=bpath.with_name(f"{mname}-f2pywrappers2.f90"),
68 cmodf=bpath.with_name(f"{mname}module.c"),
69 )
70
71
72################

Callers 9

test_gh23598_warnFunction · 0.85
test_f2py_skipFunction · 0.85
test_f2py_onlyFunction · 0.85
test_mod_gen_f77Function · 0.85
test_mod_gen_gh25263Function · 0.85
test_lower_cmodFunction · 0.85
test_lower_sigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…