Skip to content

Commit aa6d10d

Browse files
committed
Using numpy array from return if possible
1 parent 4311efb commit aa6d10d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/indexes/datetimelike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def map(self, f):
353353

354354
# Try to use this result if we can
355355
if isinstance(result, np.ndarray):
356-
self._shallow_copy(result)
356+
result = Index(result)
357357

358358
if not isinstance(result, Index):
359359
raise TypeError('The map function must return an Index object')

0 commit comments

Comments
 (0)