Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHON DOCS: Use proper filter and parameter names in Tutorial 1. #1048

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions wrapping/python/docs/source/Tutorial_1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ that you are interested in running.

conda config --add channels conda-forge
conda config --set channel_priority strict
conda create -c bluequartzsoftware -n nxpython python=3.12 dream3dnx
conda create -c bluequartzsoftware -n nxpython python=3.12 dream3dnx matplotlib
conda activate nxpython

.. _Tutorial_1_Intro:
Expand Down Expand Up @@ -107,7 +107,7 @@ inline instantiate the filter and execute it all in the same line. Some things t

.. code:: python

result = nx.CreateDataGroup.execute(data_structure=data_structure,
result = nx.CreateDataGroupFilter.execute(data_structure=data_structure,
data_object_path=nx.DataPath("Top Level Group"))
print(f'{data_structure.hierarchy_to_str()}')

Expand All @@ -129,7 +129,7 @@ Let's try to add a bunch of groups to the :ref:`DataStructure` object by using a
for i in range(1, 6):

current_data_group_path = nx.DataPath(f"Top Level Group {i}")
result = nx.CreateDataGroup.execute(data_structure=data_structure,
result = nx.CreateDataGroupFilter.execute(data_structure=data_structure,
data_object_path=current_data_group_path)
print(f'{data_structure.hierarchy_to_str()}')

Expand Down Expand Up @@ -178,9 +178,9 @@ If you were to integrate this into your own code, then we would get the followin

.. code:: python

result = nx.CreateDataGroup.execute(data_structure=data_structure,
result = nx.CreateDataGroupFilter.execute(data_structure=data_structure,
data_object_path=nx.DataPath("Top Level Group"))
check_filter_result( nx.CreateDataGroup(), result)
check_filter_result( nx.CreateDataGroupFilter(), result)


################################################
Expand All @@ -196,9 +196,9 @@ from the :ref:`DataArray`, enough to get the name, tuple shape and component sha

result = nx.CreateDataArrayFilter().execute(data_structure=data_structure,
component_count=1,
initialization_value="0",
numeric_type=nx.NumericType.float32,
output_data_array=nx.DataPath("Top Level Group/2D Array"),
initialization_value_str="0",
numeric_type_index=nx.NumericType.float32,
output_array_path=nx.DataPath("Top Level Group/2D Array"),
tuple_dimensions=[[5,4]])
check_filter_result( nx.CreateDataArrayFilter(), result)
print(f'{data_structure.hierarchy_to_str()}')
Expand Down
Loading