File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ def __getattr__(self, name):
7373
7474 def zeros_like (self , ary ):
7575 def _zeros_like (array ):
76- return self ._array_context .zeros (array .shape , array .dtype )
76+ return self ._array_context .zeros (
77+ array .shape , array .dtype ).copy (axes = array .axes , tags = array .tags )
7778
7879 return self ._array_context ._rec_map_container (
7980 _zeros_like , ary , default_scalar = 0 )
@@ -83,7 +84,8 @@ def ones_like(self, ary):
8384
8485 def full_like (self , ary , fill_value ):
8586 def _full_like (subary ):
86- return pt .full (subary .shape , fill_value , subary .dtype )
87+ return pt .full (subary .shape , fill_value , subary .dtype ).copy (
88+ axes = subary .axes , tags = subary .tags )
8789
8890 return self ._array_context ._rec_map_container (
8991 _full_like , ary , default_scalar = fill_value )
You can’t perform that action at this time.
0 commit comments