Skip to content

Commit 83188a3

Browse files
committed
HTML repr: don't crash when there is a pd.DataFrame in .obsm or .varm
1 parent 48db793 commit 83188a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mudata/_core/repr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ def details_block_table(data, attr, name, expand=0, dims=True, square=False):
127127
<td class='col-index'>{}</td> <td class='hl-types'>{}</td> <td><span class='hl-import'>{}</span>{}</td> <td class='hl-dims'>{}</td>
128128
</tr>""".format(
129129
attr_key,
130-
obj[attr_key].dtype,
130+
obj[attr_key].dtype if hasattr(obj[attr_key], "dtype") else "",
131131
*maybe_module_class(obj[attr_key]),
132-
f"{obj[attr_key].shape[1]} dims"
132+
f"{obj[attr_key].shape[1]} columns"
133133
if len(obj[attr_key].shape) > 1 and dims
134134
else "",
135135
)

0 commit comments

Comments
 (0)