diff options
author | Pauli Virtanen <pav@iki.fi> | 2010-02-20 18:11:55 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2010-02-20 18:11:55 +0000 |
commit | 97b333c573bbbe62e761f9880ed227802a791525 (patch) | |
tree | 603555fb7d22ffafb93bb8d95b1455c9301b6d9c | |
parent | 4662956d7c4f1e76468d8e161f33928f20983679 (diff) | |
download | numpy-97b333c573bbbe62e761f9880ed227802a791525.tar.gz |
ENH: core: allow unicode file names in PyArray_Dump
-rw-r--r-- | numpy/core/src/multiarray/methods.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c index b2600e962..95d79c05e 100644 --- a/numpy/core/src/multiarray/methods.c +++ b/numpy/core/src/multiarray/methods.c @@ -1539,7 +1539,7 @@ PyArray_Dump(PyObject *self, PyObject *file, int protocol) 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; |