Skip to content

Commit d202334

Browse files
committed
Override __repr__ in the docs folder
1 parent acc40da commit d202334

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333
for mod_name in MOCK_MODULES:
3434
sys.modules[mod_name] = mock.Mock()
3535

36+
class CustomMock(mock.Mock):
37+
def __repr__(self):
38+
return "<cp.ndarray>"
39+
40+
sys.modules["cupy"] = CustomMock()
41+
sys.modules["numpy"] = CustomMock()
42+
3643
# ------------------------------------------------------------------------------
3744

3845
project = "HTTomolibgpu"

0 commit comments

Comments
 (0)