zhreshold commented on a change in pull request #12285: Change the way NDArrayIter handle the last batch URL: https://github.com/apache/incubator-mxnet/pull/12285#discussion_r214467774
########## File path: python/mxnet/io.py ########## @@ -17,30 +17,26 @@ """Data iterators for common data formats.""" from __future__ import absolute_import -from collections import OrderedDict, namedtuple +from collections import namedtuple import sys import ctypes import logging import threading -try: - import h5py -except ImportError: - h5py = None import numpy as np + from .base import _LIB from .base import c_str_array, mx_uint, py_str from .base import DataIterHandle, NDArrayHandle from .base import mx_real_t from .base import check_call, build_param_doc as _build_param_doc from .ndarray import NDArray from .ndarray.sparse import CSRNDArray -from .ndarray.sparse import array as sparse_array from .ndarray import _ndarray_cls from .ndarray import array -from .ndarray import concatenate -from .ndarray import arange -from .ndarray.random import shuffle as random_shuffle +from .ndarray import concat + +from .io_utils import init_data, has_instance, getdata_by_idx Review comment: not convinced to create a separate utils file, and this import will actually pollute the namespace. The original _private_function is good IMO. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
