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
Typically we would only want to do this once per application, to avoid diverging environments and recurring the performance cost of the build. All code examples in this section will assume we have created an `OpEnvironment` named `ops`.
18
+
Typically we would only want to do this once per application, to avoid diverging environments and reincurring the performance cost of the build. All code examples in this section will assume we have created an `OpEnvironment` named `ops`.
19
19
20
20
As the `OpEnvironment` is fully extensible, different `OpEnvironment`s might contain different Ops, so it is important to be able to query an `OpEnvironment` about its available Ops. We also need to be able to get information about the usage of these Ops, to know what parameters may be required.
21
21
22
22
The `OpEnvironment.help()` API is your window into the `OpEnvironment`. In the following sections we cover the different types of information that can be obtained. **Note that the exact printouts from the help API may be different from the Ops available in *your* environment**.
23
23
24
24
## Listing Namespaces
25
25
26
-
The no-argument method `OpEnvironment.help()` is designed to give you a broad overview over the *categories* (namespaces) of Ops available within the `OpEnvironment`:
26
+
The no-argument method `ops.help()` is designed to give you a broad overview over the *categories* (namespaces) of Ops available within the `OpEnvironment`:
27
27
28
-
```
28
+
```python
29
29
print(ops.help())
30
30
```
31
31
@@ -64,7 +64,8 @@ These namespace categories can then be interrogated further to explore the parti
64
64
## Querying a Namespace
65
65
66
66
You can choose one of the above namespaces, and `ops.help()` will give you information about the algorithms contained within:
67
-
```
67
+
68
+
```python
68
69
print(ops.help("filter"))
69
70
```
70
71
@@ -111,9 +112,9 @@ Names:
111
112
112
113
## Querying Op Signatures
113
114
114
-
Finally, you can use `OpEnvironment.help()` on any Op name to see the list of signatures:
115
+
Finally, you can use `ops.help()` on any Op name to see the list of signatures:
115
116
116
-
```
117
+
```python
117
118
print(ops.help("filter.gauss"))
118
119
```
119
120
@@ -127,7 +128,7 @@ filter.gauss:
127
128
128
129
## In-depth Op Information
129
130
130
-
The basic descriptions from `OpEnvironment.help()` are intentionally simplified to avoid providing overwhelming amounts of information. However, you can obtain more complete descriptions, including documentation (if available), from `OpEnvironment.helpVerbose()`:
131
+
The basic descriptions from `ops.help()` are intentionally simplified to avoid providing overwhelming amounts of information. However, you can obtain more complete descriptions, including documentation (if available), from `ops.helpVerbose()`:
131
132
132
133
```
133
134
print(ops.helpVerbose("filter.gauss"))
@@ -159,4 +160,4 @@ filter.gauss:
159
160
the preallocated output image
160
161
```
161
162
162
-
`OpEnvironment.helpVerbose()` can be used interchangeably whenever you would use `OpEnvironment.help()`, as needed.
163
+
The `ops.helpVerbose()`method can be used interchangeably whenever you would use `ops.help()`, as needed.
0 commit comments