Skip to content

Raise informative error on chunks=None - #416

Merged
mrocklin merged 4 commits into
dask:masterfrom
mrocklin:chunks-error
Jul 13, 2015
Merged

mrocklin merged 4 commits into
dask:masterfrom
mrocklin:chunks-error

Conversation

@mrocklin

Copy link
Copy Markdown
Member

Fixes #415

Example

In [1]: import dask.array as da

In [2]: da.random.random(size=(100, 100))
ValueError: You must specify a chunks= keyword argument.
This specifies the chunksize of your array blocks.

See the following documentation page for details:
  http://dask.pydata.org/en/latest/array-creation.html#chunks

cc @JDWarner

Fixes dask#415

Example
-------

In [1]: import dask.array as da

In [2]: da.random.random(size=(100, 100))
ValueError: You must specify a chunks= keyword argument.
This specifies the chunksize of your array blocks.

See the following documentation page for details:
  http://dask.pydata.org/en/latest/array-creation.html#chunks

cc @JDWarner
mrocklin added 2 commits July 11, 2015 23:15
This avoids accidental mutation and redirects users to the rechunk method

Example
-------

In [1]: import dask.array as da

In [2]: x = da.ones(6, chunks=3)

In [3]: x.chunks = 2
ValueError: Can not set chunks directly

Please use the rechunk method instead:
  x.rechunk(2)

cc @JDWarner
mrocklin added a commit that referenced this pull request Jul 13, 2015
Raise informative error on chunks=None
@mrocklin
mrocklin merged commit f542a2f into dask:master Jul 13, 2015
@mrocklin
mrocklin deleted the chunks-error branch July 13, 2015 20:56
@mrocklin

Copy link
Copy Markdown
Member Author

Merged. Thanks @JDWarner !

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.

1 participant