GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MAINT: Reduce chatter to pass tests · numpy/numpy@45137e0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • numpy/f2py
    • _isocbind.py
    • auxfuncs.py
    • capi_maps.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎numpy/f2py/_isocbind.py‎

Copy file name to clipboardExpand all lines: numpy/f2py/_isocbind.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
'long double': 'g', # long double
7979
'float _Complex': 'F', # float _Complex
8080
'double _Complex': 'D', # double _Complex
81-
'long double _Complex': 'G', # long double _Complex
82-
'_Bool': '?', # Bool
81+
'long double _Complex': 'D', # very approximate complex
82+
'_Bool': 'i', # Bool but not really
8383
'char': 'c', # char
8484
}
8585

Collapse file

‎numpy/f2py/auxfuncs.py‎

Copy file name to clipboardExpand all lines: numpy/f2py/auxfuncs.py
+11-6Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ def getuseblocks(pymod):
918918
all_uses.extend([x for x in modblock.get("use").keys() if "__" not in x])
919919
return all_uses
920920

921-
def process_f2cmap_dict(f2cmap_all, new_map, c2py_map):
921+
def process_f2cmap_dict(f2cmap_all, new_map, c2py_map, verbose = False):
922922
"""
923923
Update the Fortran-to-C type mapping dictionary with new mappings and
924924
return a list of successfully mapped C types.
@@ -947,6 +947,9 @@ def process_f2cmap_dict(f2cmap_all, new_map, c2py_map):
947947
types to corresponding Python types and is used to ensure that the C
948948
types specified in `new_map` are valid.
949949
950+
verbose : boolean
951+
A flag used to provide information about the types mapped
952+
950953
Returns
951954
-------
952955
tuple of (dict, list)
@@ -972,12 +975,14 @@ def process_f2cmap_dict(f2cmap_all, new_map, c2py_map):
972975
% (k, k1, f2cmap_all[k][k1], v1)
973976
)
974977
f2cmap_all[k][k1] = v1
975-
outmess('\tMapping "%s(kind=%s)" to "%s"\n' % (k, k1, v1))
978+
if verbose:
979+
outmess('\tMapping "%s(kind=%s)" to "%s"\n' % (k, k1, v1))
976980
f2cmap_mapped.append(v1)
977981
else:
978-
errmess(
979-
"\tIgnoring map {'%s':{'%s':'%s'}}: '%s' must be in %s\n"
980-
% (k, k1, v1, v1, list(c2py_map.keys()))
981-
)
982+
if verbose:
983+
errmess(
984+
"\tIgnoring map {'%s':{'%s':'%s'}}: '%s' must be in %s\n"
985+
% (k, k1, v1, v1, list(c2py_map.keys()))
986+
)
982987

983988
return f2cmap_all, f2cmap_mapped
Collapse file

‎numpy/f2py/capi_maps.py‎

Copy file name to clipboardExpand all lines: numpy/f2py/capi_maps.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def load_f2cmap_file(f2cmap_file):
155155
outmess('Reading f2cmap from {!r} ...\n'.format(f2cmap_file))
156156
with open(f2cmap_file) as f:
157157
d = eval(f.read().lower(), {}, {})
158-
f2cmap_all, f2cmap_mapped = process_f2cmap_dict(f2cmap_all, d, c2py_map)
158+
f2cmap_all, f2cmap_mapped = process_f2cmap_dict(f2cmap_all, d, c2py_map, True)
159159
outmess('Successfully applied user defined f2cmap changes\n')
160160
except Exception as msg:
161161
errmess('Failed to apply user defined f2cmap changes: %s. Skipping.\n' % (msg))

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.