Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 17, 2023. It is now read-only.

Conversation

@DPeterK
Copy link
Member

@DPeterK DPeterK commented Oct 30, 2015

Removes cleverness in setting variable (bytes and size-based) chunk sizes in favour of fixing a chunk size of 8 bytes. This works around a problem where performing operations on arrays with differing dtypes causes a broadcasting error because the chunks end up having differing sizes.

Also improves the _all_slices tests and documentation because these changes flowed from confirming that the right approach was being followed to make this change.

Closes #161 and fixes #164.

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't make sense to me to keep the concept of bytes. Really you're moving from counting bytes to counting array elements.

Copy link
Member

Choose a reason for hiding this comment

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

In other words, I'd rename this variable as something like n_elements and start with n_elements = 1

@DPeterK
Copy link
Member Author

DPeterK commented Nov 16, 2015

Replaced nbytes (number of bytes to chunk on) with the more appropriate concept of n_elems (number of elements to chunk on), and have reduced its starting value to 1.

Have made necessary test changes and added an admittedly complex integration test that captures a previously-failing edge case that has been fixed by the change to n_elems = 1.

@DPeterK
Copy link
Member Author

DPeterK commented Nov 16, 2015

Hmm, though I still can't get the Travis tests working 😠 All the tests pass locally!

@pelson
Copy link
Member

pelson commented Nov 16, 2015

Hmm, though I still can't get the Travis tests working 😠 All the tests pass locally!

You tested py3k, right?

@DPeterK
Copy link
Member Author

DPeterK commented Nov 16, 2015

Ah! Much better 😀

@marqh
Copy link
Member

marqh commented Nov 23, 2015

Hi @dkillick

the tests are passing but there are merge conflicts, please may you rebase and push?

thank you

@DPeterK DPeterK force-pushed the constant_chunk_size branch from 890c584 to c240845 Compare November 23, 2015 12:07
@DPeterK
Copy link
Member Author

DPeterK commented Nov 23, 2015

Rebased.

Bump? @pelson @rhattersley

pelson added a commit that referenced this pull request Nov 23, 2015
@pelson pelson merged commit ca95c3c into SciTools:master Nov 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using biggus operators on 'large' varying-dtype arrays

4 participants