From 0322122c3819a812ca23309626774dd43c99f930 Mon Sep 17 00:00:00 2001 From: Ryan Dunn <71475179+RyanDunn729@users.noreply.github.com> Date: Thu, 27 Apr 2023 14:56:02 -0700 Subject: [PATCH] Update systemgraph to use sparse zeros matrix --- python_csdl_backend/core/systemgraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_csdl_backend/core/systemgraph.py b/python_csdl_backend/core/systemgraph.py index 7e8dcf5..9d753cb 100644 --- a/python_csdl_backend/core/systemgraph.py +++ b/python_csdl_backend/core/systemgraph.py @@ -812,7 +812,7 @@ def generate_reverse(self, output_ids, input_ids): else: # case 3: rev_block.comment(f'{totals_name} = zero') input_size = np.prod(self.unique_to_node[input_id].var.shape) - prerev_vars[totals_name] = np.zeros((output_size, input_size)) + prerev_vars[totals_name] = sp.csc_matrix((output_size, input_size)) # print statement print_loading(