Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
C
covid_analysis
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
COMPARA
covid_analysis
Commits
866332c3
Commit
866332c3
authored
Jun 14, 2024
by
Joaquin Torres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aux script to print shapes of matrices
parent
3a57a7c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
explicability/print_shapes.py
explicability/print_shapes.py
+15
-0
No files found.
explicability/print_shapes.py
0 → 100644
View file @
866332c3
import
os
import
numpy
as
np
def
print_shapes
(
directory
):
# List all files in the directory
for
file
in
os
.
listdir
(
directory
):
if
file
.
endswith
(
".npy"
):
# Load the .npy file
data
=
np
.
load
(
os
.
path
.
join
(
directory
,
file
))
# Print the shape of the numpy array
print
(
f
"{file}: {data.shape}"
)
# Example usage:
directory_path
=
'./output/shap_inter_values'
print_shapes
(
directory_path
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment