Skip to content

Commit 5871eb9

Browse files
authored
fix minor doc typos (#46)
* fix minor doc typos Signed-off-by: Martijn Govers <[email protected]> * more small edits Signed-off-by: Martijn Govers <[email protected]> * found another small issue Signed-off-by: Martijn Govers <[email protected]> * fix Grid.from_txt example notebook Signed-off-by: Martijn Govers <[email protected]> * source node -> substation node in from_txt Signed-off-by: Martijn Govers <[email protected]> --------- Signed-off-by: Martijn Govers <[email protected]> Signed-off-by: Martijn Govers <[email protected]>
1 parent 4c3f19d commit 5871eb9

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

docs/examples/model/grid_extensions_examples.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"\n",
1212
"## Adding columns to the Grid arrays\n",
1313
"\n",
14-
"Output variables are not present in the basic Grid as defined in gpm-ds, since these might or might not be useful to specific projects.\n",
14+
"Output variables are not present in the basic Grid as defined in pgm-ds, since these might or might not be useful to specific projects.\n",
1515
"To add these as you please you can extend the definitions of the arrays in your own project.\n"
1616
]
1717
},

docs/examples/utils/grid_from_txt_examples.ipynb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"If you follow a specific syntax, you can use the input from the\n",
2121
"graph editor to transfer your drawing to pgm-ds:\n",
2222
"\n",
23-
"- A _source node_ should be prefixed with `S`\n",
23+
"- A _substation node_ should be prefixed with `S`\n",
2424
" - e.g: `S1`, `S2`\n",
2525
"- A _line_ is defined as `<from_node> <to_node>`\n",
2626
" - From nodes can be both regular nodes and source nodes\n",
@@ -61,7 +61,7 @@
6161
},
6262
{
6363
"cell_type": "code",
64-
"execution_count": 9,
64+
"execution_count": 1,
6565
"metadata": {},
6666
"outputs": [],
6767
"source": [
@@ -84,29 +84,27 @@
8484
},
8585
{
8686
"cell_type": "code",
87-
"execution_count": 7,
87+
"execution_count": 2,
8888
"metadata": {},
8989
"outputs": [],
9090
"source": [
9191
"from power_grid_model_ds import Grid\n",
9292
"\n",
9393
"grid = Grid.from_txt(\n",
94-
" [\n",
95-
" \"S1 2\",\n",
96-
" \"S1 3 open\",\n",
97-
" \"2 7\",\n",
98-
" \"3 5\",\n",
99-
" \"3 6 transformer\",\n",
100-
" \"5 7\",\n",
101-
" \"7 8\",\n",
102-
" \"8 9\",\n",
103-
" ]\n",
94+
" \"S1 2\",\n",
95+
" \"S1 3 open\",\n",
96+
" \"2 7\",\n",
97+
" \"3 5\",\n",
98+
" \"3 6 transformer\",\n",
99+
" \"5 7\",\n",
100+
" \"7 8\",\n",
101+
" \"8 9\",\n",
104102
")"
105103
]
106104
},
107105
{
108106
"cell_type": "code",
109-
"execution_count": 10,
107+
"execution_count": 3,
110108
"metadata": {},
111109
"outputs": [
112110
{
@@ -132,7 +130,7 @@
132130
],
133131
"metadata": {
134132
"kernelspec": {
135-
"display_name": "Python 3 (ipykernel)",
133+
"display_name": "venv",
136134
"language": "python",
137135
"name": "python3"
138136
},
@@ -146,7 +144,7 @@
146144
"name": "python",
147145
"nbconvert_exporter": "python",
148146
"pygments_lexer": "ipython3",
149-
"version": "3.13.1"
147+
"version": "3.13.0"
150148
}
151149
},
152150
"nbformat": 4,

docs/model_interface.ipynb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,25 @@
8787
"cell_type": "markdown",
8888
"metadata": {},
8989
"source": [
90+
"```py\n",
9091
"target_line = grid.arrays.line.get(1)\n",
91-
"grid.make_active(target_branch_array=target_line)\n"
92+
"grid.make_active(target_branch_array=target_line)\n",
93+
"```\n"
9294
]
9395
},
9496
{
9597
"cell_type": "markdown",
9698
"metadata": {},
9799
"source": [
98-
"As seen above you can also make batch modification using the `grid.append` method.\n",
100+
"As seen above, you can also apply multiple modifications in one go using the `grid.append` method.\n",
99101
"\n",
100102
"## Array interface\n",
101103
"\n",
102-
"The array container is build around a extension of numpy arrays with the `FancyArray` class. This allows for easy and consistent definition of array types, recognition of array-type from it's class and features which improve readability such as dot-notation and autocompletion. It contains a `._data` attribute with the base numpy array and extra settings can be provided using `._defaults` and `._str_lengths`. Note these values should only be used in defining the array classes and remain private when using the arrays.\n",
104+
"The array container is build around a extension of numpy arrays with the `FancyArray` class. This allows for easy and consistent definition of array types, recognition of array-type from its class and features which improve readability such as dot-notation and autocompletion. It contains a `._data` attribute with the base numpy array and extra settings can be provided using `._defaults` and `._str_lengths`. Note these values should only be used in defining the array classes and remain private when using the arrays.\n",
103105
"\n",
104106
"### Array definition\n",
105107
"\n",
106-
"You can create your own array by subclassing FancyArray.\n",
108+
"You can create your own array by subclassing `FancyArray`.\n",
107109
"Array-columns can be defined by adding class attributes with the column name and the numpy dtype.\n",
108110
"\n",
109111
"Example:\n"
@@ -148,7 +150,7 @@
148150
"cell_type": "markdown",
149151
"metadata": {},
150152
"source": [
151-
"These are used when initializing an array with the .empty method\n"
153+
"These are used when initializing an array with the `.empty` method\n"
152154
]
153155
},
154156
{
@@ -190,7 +192,7 @@
190192
"\n",
191193
"### Array loops\n",
192194
"\n",
193-
"Looping over large arrays can be a performance hit, this is caused by casting each row to the original `FancyArray` subclass. When you want to implement a faster loop over the array you can choose to access the `array.data` directly and create the loop using\n"
195+
"Looping over large arrays can incur a performance hit caused by conversion of each element to the original `FancyArray` subclass. When you want to implement a faster loop over the array you can choose to access the `array.data` directly and create the loop using\n"
194196
]
195197
},
196198
{

0 commit comments

Comments
 (0)