Skip to content

Fixes typo in array creation docs - #3433

Merged
jakirkham merged 2 commits into
dask:masterfrom
jrbourbeau:h5py_array_creation_typo
Apr 24, 2018
Merged

jakirkham merged 2 commits into
dask:masterfrom
jrbourbeau:h5py_array_creation_typo

Conversation

@jrbourbeau

Copy link
Copy Markdown
Member

This PR fixes a minor typo in the "Concatenation and Stacking" section of the array creation docs

dask_arrays.append(x)

x = da.concatenate(arrays, axis=0) # concatenate arrays along first axis
x = da.concatenate(dask_arrays, axis=0) # concatenate arrays along first axis

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not blocking, but maybe we should rename x here to something else (given it is used in the for-loop above). Alternatively we could rename the x in the for-loop.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. I can change the x inside the for-loop to array. I.e.

dask_arrays = []
for fn in filenames:
    f = h5py.File(fn)
    d = f['/data']
    array = da.from_array(d, chunks=(1000, 1000))
    dask_arrays.append(array)

x = da.concatenate(dask_arrays, axis=0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SGTM

@jakirkham
jakirkham merged commit daeaaaa into dask:master Apr 24, 2018
@jakirkham

Copy link
Copy Markdown
Member

Thanks @jrbourbeau.

@jrbourbeau
jrbourbeau deleted the h5py_array_creation_typo branch April 24, 2018 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants