[Numpy-svn] r5340 - trunk/numpy/lib

numpy-svn@scip... numpy-svn@scip...
Thu Jul 3 01:23:16 CDT 2008


Author: rkern
Date: 2008-07-03 01:23:15 -0500 (Thu, 03 Jul 2008)
New Revision: 5340

Modified:
   trunk/numpy/lib/getlimits.py
Log:
Added note to numpy developers about the policy on using finfo in numpy's codebase.

Modified: trunk/numpy/lib/getlimits.py
===================================================================
--- trunk/numpy/lib/getlimits.py	2008-07-03 06:15:14 UTC (rev 5339)
+++ trunk/numpy/lib/getlimits.py	2008-07-03 06:23:15 UTC (rev 5340)
@@ -31,6 +31,13 @@
     See Also
     --------
     numpy.lib.machar.MachAr
+
+    Notes
+    -----
+    For developers of numpy: do not instantiate this at the module level. The
+    initial calculation of these parameters is expensive and negatively impacts
+    import times. These objects are cached, so calling `finfo()` repeatedly
+    inside your functions is not a problem.
     """
 
     _finfo_cache = {}



More information about the Numpy-svn mailing list