Skip to content

Commit 604da0e

Browse files
committed
Fix example code for custom_operators.rst
1 parent 4878dbc commit 604da0e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/user_guide/tutorials/custom_operators_and_plugins/custom_operator_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ def run(self):
8787

8888
def load_operators(*args):
8989
from ansys.dpf.core.custom_operator import record_operator
90-
record_operator(operator_type=CustomOperator, *args)
90+
record_operator(CustomOperator, *args)

doc/source/user_guide/tutorials/custom_operators_and_plugins/custom_operators.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ First, start a server in gRPC mode, which is the only server type supported for
103103

104104
.. jupyter-execute::
105105

106+
import os
106107
import ansys.dpf.core as dpf
107108

108109
# Python plugins are not supported in process.
@@ -118,7 +119,7 @@ With the server and custom plugin ready, use the :func:`load_library() <ansys.dp
118119
.. jupyter-execute::
119120

120121
dpf.load_library(
121-
filename=r".", # Look into the current directory
122+
filename=os.getcwd(), # Look into the current directory
122123
name="py_custom_operator_example", # Look for a Python file named 'custom_operator_example.py'
123124
symbol="load_operators", # Look for the entry-point where operators are recorded
124125
server=server, # Load the plugin on the server previously started

0 commit comments

Comments
 (0)