@@ -5785,6 +5785,8 @@ def opmethod(self, other) -> 'Array':
5785
5785
other = asarray (other )
5786
5786
elif other is not None and not isinstance (other , (Array , np .ndarray )) and not np .isscalar (other ):
5787
5787
# support for inspect.signature
5788
+ # FIXME: this should only be the case for __eq__. For other operations, we should
5789
+ # probably raise a TypeError (or return NotImplemented???)
5788
5790
return False
5789
5791
5790
5792
if isinstance (other , Array ):
@@ -6515,7 +6517,13 @@ def append(self, axis, value, label=None) -> 'Array':
6515
6517
Other F 0.0 0.0
6516
6518
"""
6517
6519
axis = self .axes [axis ]
6518
- return self .insert (value , before = IGroup (len (axis ), axis = axis ), label = label )
6520
+ if isinstance (value , Array ) and axis in value .axes :
6521
+ # This is just an optimization because going via the insert path
6522
+ # for this case makes this 10x slower.
6523
+ # FIXME: we should fix insert slowness instead
6524
+ return concat ((self , value ), axis )
6525
+ else :
6526
+ return self .insert (value , before = IGroup (len (axis ), axis = axis ), label = label )
6519
6527
extend = renamed_to (append , 'extend' )
6520
6528
6521
6529
def prepend (self , axis , value , label = None ) -> 'Array' :
0 commit comments