Skip to content

Commit f0ed81c

Browse files
Use usm_ndarray template for documenting array object class
1 parent 87a7e8f commit f0ed81c

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
6+
7+
.. autoclass:: {{ name }}
8+
9+
{% block methods %}
10+
11+
{% if methods %}
12+
.. rubric:: {{ _('Methods') }}
13+
14+
.. autosummary::
15+
:toctree: generated
16+
{% for item in methods if item != "__init__" %}
17+
~{{ name }}.{{ item }}
18+
{%- endfor %}
19+
{% endif %}
20+
{% endblock %}
21+
22+
{% block attributes %}
23+
{% if attributes %}
24+
.. rubric:: {{ _('Attributes') }}
25+
26+
.. autosummary::
27+
:toctree: generated
28+
{% for item in attributes %}
29+
~{{ name }}.{{ item }}
30+
{%- endfor %}
31+
~{{name}}.__dlpack_device__
32+
~{{name}}.__dlpack__
33+
~{{name}}.__sycl_usm_array_interface__
34+
{% endif %}
35+
{% endblock %}

docs/doc_sources/api_reference/dpctl/tensor.usm_ndarray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Implementation of :py:class:`usm_ndarray` conforms to
1616
1717
.. autosummary::
1818
:toctree: generated
19-
:template: autosummary/cython_class.rst
19+
:template: autosummary/usm_ndarray.rst
2020

2121
usm_ndarray
2222

0 commit comments

Comments
 (0)