[Numpy-svn] r8160 - trunk/numpy/core/src/multiarray

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:11:55 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:11:55 -0600 (Sat, 20 Feb 2010)
New Revision: 8160

Modified:
   trunk/numpy/core/src/multiarray/methods.c
Log:
ENH: core: allow unicode file names in PyArray_Dump

Modified: trunk/numpy/core/src/multiarray/methods.c
===================================================================
--- trunk/numpy/core/src/multiarray/methods.c	2010-02-20 18:11:38 UTC (rev 8159)
+++ trunk/numpy/core/src/multiarray/methods.c	2010-02-20 18:11:55 UTC (rev 8160)
@@ -1539,7 +1539,7 @@
     if (cpick == NULL) {
         return -1;
     }
-    if (PyString_Check(file)) {
+    if (PyBytes_Check(file) || PyUnicode_Check(file)) {
         file = npy_PyFile_OpenFile(file, "wb");
         if (file == NULL) {
             return -1;



More information about the Numpy-svn mailing list