8000 Allow for scalar keys prior to the mosaic axis. by rhattersley · Pull Request #113 · SciTools/biggus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 17, 2023. It is now read-only.

Allow for scalar keys prior to the mosaic axis. #113

Merged
merged 1 commit into from
Dec 23, 2014
Merged

Allow for scalar keys prior to the mosaic axis. #113

merged 1 commit into from
Dec 23, 2014

Conversation

rhattersley
Copy link
Member

This PR fixes a bug which occurs when a mosaic with a non-zero axis is sliced with a scalar key prior to that axis. For example:

>>> mosaic = LinearMosaic([tile1, tile2], axis=2)
>>> mosaic[0, :, :]
ValueError: invalid axis for 2-dimensional tiles

Bug reported by pagw on the Iris discussion group.

@rhattersley rhattersley added this to the v0.8 milestone Dec 22, 2014
@pelson
Copy link
Member
pelson commented Dec 22, 2014

Did you test / is there a new axis concept as per np.newaxis?

8000

@rhattersley
Copy link
Member Author

is there a new axis concept

That isn't supported in biggus at the moment.

pelson added a commit that referenced this pull request Dec 23, 2014
Allow for scalar keys prior to the mosaic axis.
@pelson pelson merged commit 61b1fbe into SciTools:master Dec 23, 2014
@rhattersley rhattersley deleted the fix-mosaic-indexing branch December 23, 2014 11:36
@rhattersley
Copy link
Member Author

Thanks @pelson 👍 ... especially since you're supposed to be on holiday. 😛

@pelson
Copy link
Member
pelson commented Dec 23, 2014

Thanks @pelson 👍 ... especially since you're supposed to be on holiday. 😛

Indeed 😉 - I'm just playing at the moment.

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.

2 participants
0