Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ matrix:
fast_finish: true
include:
- python: "2.7"
env: PACKAGES=blosc
- python: "3.4"
env: COVERAGE=true
- python: "3.5"
Expand All @@ -15,7 +16,7 @@ matrix:
sudo: true
dist: trusty
- python: "3.5"
env: HDFS=true
env: HDFS=true PACKAGES=blosc
sudo: true
dist: trusty

Expand Down Expand Up @@ -48,7 +49,7 @@ install:
# Install dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- conda install -q pytest pytest-timeout coverage tornado toolz dill futures dask ipywidgets psutil bokeh requests joblib mock ipykernel jupyter_client h5py netcdf4 lz4 paramiko tblib click -c conda-forge
- conda install -q pytest pytest-timeout coverage tornado toolz dill futures dask ipywidgets psutil bokeh requests joblib mock ipykernel jupyter_client h5py netcdf4 lz4 paramiko tblib click $PACKAGES -c conda-forge
- |
if [[ $HDFS == true ]]; then
conda install -q libxml2 krb5 boost
Expand Down
2 changes: 1 addition & 1 deletion distributed/protocol/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def serialize_numpy_ndarray(x):
'strides': x.strides,
'shape': x.shape}

data = x.view('u1').data
data = x.ravel().view('u1').data

if blosc and x.nbytes > 1e5:
frames = frame_split_size([data])
Expand Down
2 changes: 2 additions & 0 deletions distributed/protocol/tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def test_serialize():
np.array([(1, 'abc')], dtype=[('x', 'i4'), ('s', object)]),
np.zeros(5000, dtype=[('x%d'%i,'<f8') for i in range(4)]),
np.zeros(5000, dtype='S32'),
np.zeros((1, 1000, 1000)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add a non-contiguous array to that list.
(for example np.arange(12)[::2]).

np.arange(12)[::2], # non-contiguous array
np.ones(shape=(5, 6)).astype(dtype=[('total', '<f8'), ('n', '<f8')])])
def test_dumps_serialize_numpy(x):
header, frames = serialize(x)
Expand Down