回答編集履歴
1
横一列の表示
test
CHANGED
@@ -103,3 +103,43 @@
|
|
103
103
|
df_gumna: (10, 4)
|
104
104
|
|
105
105
|
```
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
追加、
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
すみません、投稿者さまのように横一列に表示したければ、
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
from inspect import currentframe
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
def print_shape(* args):
|
128
|
+
|
129
|
+
names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
|
130
|
+
|
131
|
+
print(
|
132
|
+
|
133
|
+
", ".join(
|
134
|
+
|
135
|
+
names.get(id(arg),'???') + " shape: " + repr(arg.shape) for arg in args
|
136
|
+
|
137
|
+
)
|
138
|
+
|
139
|
+
)
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
としてください!
|