|
8 | 8 | from datetime import datetime, timedelta |
9 | 9 | from functools import partial |
10 | 10 |
|
11 | | -from numpy.lib.format import read_array, write_array |
12 | 11 | import numpy as np |
13 | | - |
14 | 12 | import pandas as pd |
15 | 13 | import pandas.algos as algos |
16 | 14 | import pandas.lib as lib |
17 | 15 | import pandas.tslib as tslib |
18 | 16 | from pandas import compat |
19 | | -from pandas.compat import (BytesIO, range, long, u, zip, map, string_types, |
| 17 | +from pandas.compat import (range, long, u, zip, map, string_types, |
20 | 18 | iteritems) |
21 | 19 | from pandas.types import api as gt |
22 | 20 | from pandas.types.api import * # noqa |
@@ -378,27 +376,6 @@ def flatten(l): |
378 | 376 | yield el |
379 | 377 |
|
380 | 378 |
|
381 | | -def _pickle_array(arr): |
382 | | - arr = arr.view(np.ndarray) |
383 | | - |
384 | | - buf = BytesIO() |
385 | | - write_array(buf, arr) |
386 | | - |
387 | | - return buf.getvalue() |
388 | | - |
389 | | - |
390 | | -def _unpickle_array(bytes): |
391 | | - arr = read_array(BytesIO(bytes)) |
392 | | - |
393 | | - # All datetimes should be stored as M8[ns]. When unpickling with |
394 | | - # numpy1.6, it will read these as M8[us]. So this ensures all |
395 | | - # datetime64 types are read as MS[ns] |
396 | | - if is_datetime64_dtype(arr): |
397 | | - arr = arr.view(_NS_DTYPE) |
398 | | - |
399 | | - return arr |
400 | | - |
401 | | - |
402 | 379 | def _coerce_indexer_dtype(indexer, categories): |
403 | 380 | """ coerce the indexer input array to the smallest dtype possible """ |
404 | 381 | l = len(categories) |
|
0 commit comments