You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-parts/computation/01-autopopulate_lang1.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,6 @@
13
13
defmake(self, key):
14
14
img = (test.Image & key).fetch1('image')
15
15
key['filtered_image'] = myfilter(img)
16
-
self.insert(key)
16
+
self.insert1(key)
17
17
18
18
The ``make`` method receives one argument: the dict ``key`` containing the primary key value of an element of :ref:`key source <keysource>` to be worked on.
To plot the ERD for an entire schema, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
2
+
To plot the Diagram for an entire schema, an Diagram object can be initialized with the schema object (which is normally used to decorate table objects)
3
3
4
4
.. code-block:: python
5
5
6
6
import datajoint as dj
7
7
schema = dj.Schema('my_database')
8
-
dj.ERD(schema).draw()
8
+
dj.Diagram(schema).draw()
9
9
10
10
or alternatively an object that has the schema object as an attribute, such as the module defining a schema:
11
11
12
12
.. code-block:: python
13
13
14
14
import datajoint as dj
15
15
import seq # import the sequence module defining the seq database
16
-
dj.ERD(seq).draw() # draw the ERD
16
+
dj.Diagram(seq).draw() # draw the Diagram
17
17
18
18
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
19
-
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
20
-
The ERD will then render in the notebook using its ``_repr_html_`` method.
21
-
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
19
+
You can simply let the object display itself, for example by entering ``dj.Diagram(seq)`` in a notebook cell.
20
+
The Diagram will automatically render in the notebook by calling its ``_repr_html_`` method.
21
+
A Diagram displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
0 commit comments