We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ccf93e commit 4d9c8d4Copy full SHA for 4d9c8d4
pkg/VoltoMapSim/src/types.jl
@@ -0,0 +1,20 @@
1
+
2
+# Container for the data generated by a neural network simulation.
3
+# See `init_sim` for the actual properties inside.
4
+#
5
+# We use this type instead of using the wrapped NamedTuple directly, so that we don't get
6
+# the huge NamedTuple type signatures in stacktraces, and to use it for typing function
7
+# arguments
8
+struct SimData
9
+ data::NamedTuple
10
+end
11
12
+function Base.getproperty(s::SimData, name::Symbol)
13
+ if name == :data
14
+ getfield(s, :data) # Avoid recursion
15
+ else
16
+ getproperty(s.data, name)
17
+ end
18
19
20
+Base.propertynames(s::SimData) = propertynames(s.data) # For autocompletion in Jupyter.
0 commit comments