Skip to content

Commit

Permalink
CLN: Nitpicks (#33464)
Browse files Browse the repository at this point in the history
* CLN: Nitpicks

* Restarting CI as it failed to fetch a URL

Co-authored-by: MomIsBestFriend <>
  • Loading branch information
ShaharNaveh authored Apr 11, 2020
1 parent d1cba24 commit c6c5367
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pandas/_libs/reshape.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ctypedef fused reshape_t:

@cython.wraparound(False)
@cython.boundscheck(False)
def unstack(reshape_t[:, :] values, uint8_t[:] mask,
def unstack(reshape_t[:, :] values, const uint8_t[:] mask,
Py_ssize_t stride, Py_ssize_t length, Py_ssize_t width,
reshape_t[:, :] new_values, uint8_t[:, :] new_mask):
"""
Expand Down
7 changes: 3 additions & 4 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ def _getitem_nested_tuple(self, tup: Tuple):
# this is iterative
obj = self.obj
axis = 0
for i, key in enumerate(tup):
for key in tup:

if com.is_null_slice(key):
axis += 1
Expand Down Expand Up @@ -1420,7 +1420,7 @@ def _is_scalar_access(self, key: Tuple) -> bool:
if len(key) != self.ndim:
return False

for i, k in enumerate(key):
for k in key:
if not is_integer(k):
return False

Expand Down Expand Up @@ -2234,8 +2234,7 @@ def is_nested_tuple(tup, labels) -> bool:
if not isinstance(tup, tuple):
return False

for i, k in enumerate(tup):

for k in tup:
if is_list_like(k) or isinstance(k, slice):
return isinstance(labels, ABCMultiIndex)

Expand Down
4 changes: 1 addition & 3 deletions pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
make_block,
)

from pandas.io.formats.printing import pprint_thing

# TODO: flexible with index=None and/or items=None

T = TypeVar("T", bound="BlockManager")
Expand Down Expand Up @@ -325,7 +323,7 @@ def __repr__(self) -> str:
output += f"\nAxis {i}: {ax}"

for block in self.blocks:
output += f"\n{pprint_thing(block)}"
output += f"\n{block}"
return output

def _verify_integrity(self) -> None:
Expand Down

0 comments on commit c6c5367

Please sign in to comment.