ENH: Require that arguments to block lie on a grid#2
ENH: Require that arguments to block lie on a grid#2eric-wieser wants to merge 1 commit intonp-blockfrom
Conversation
To by default prevent users from making mistakes. Almost all the uses that I've seen of block matrices are trying to assemble something of the form: So I think we should raise an error if people try to construct the following accidentally |
|
I am a big fan of letting people make their own mistakes, so -1 on this feature. But don't let that stop you if the consensus is in favor. |
|
On second thought, if it's disabled by default and therefore unlikely to cause surprises, count me as neutral, despite the added maintenance burden. |
|
I lean towards @madphysicist on this as I suspect most user errors would still show up even without the added check because it takes some effort to put together a valid non-gridded array. OTOH, if the default is |
04dd000 to
35b3254
Compare
This represents the largest use case, so asking for more flexibility should be done explicitly
35b3254 to
84dbdb9
Compare
|
I'd also favour a default of |
|
I guess as a future path, So in fact, this doesn't need to be introduced in the first pass |
Simply writing |
This represents the largest use case, so asking for more flexibility should
be done explicitly.
Builds on numpy#8886.
This seems to add a 30% overhead for small (25ish) arrays