CLN: Avoiding casting
- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

---

Follow up to https://github.com/pandas-dev/pandas/pull/32794#discussion_r394045101

Looks good. Could reduce the number of comments but not a blocker for me

@jbrockmendel were there any reasons to use shape instead of len with memory views? I think I remember you mentioning something about that.  > were there any reasons to use shape instead of len with memory views? I think I remember you mentioning something about that.

Yah, for nearly the exact same reason its being done here: the `.shape` lookup happens in c-space while the `__len__` call goes into pyspace.  IIRC thats unintentional and expected to be changed in cython 0.30

LGTM; agreed that the comments can be less verbose, just one-liners `TODO(cython0.30): use len instead of shape[0]` > LGTM; agreed that the comments can be less verbose, just one-liners `TODO(cython0.30): use len instead of shape[0]`

@MomIsBestFriend can you do this? thanks @MomIsBestFriend 

should make an issue to change this once cython 0.30 is out