Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/aspire/operators/blk_diag_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def append(self, blk):
:param blk: Block to append (ndarray).
"""

self.data.append(blk)
self.data.append(blk.astype(self.dtype, copy=False))
self.nblocks += 1
self.reset_cache()

Expand Down Expand Up @@ -130,7 +130,7 @@ def __setitem__(self, key, value):
Convenience wrapper, setter on self.data.
"""

self.data[key] = value
self.data[key] = value.astype(self.dtype, copy=False)
self.reset_cache()

def __len__(self):
Expand Down