Skip to content

Commit f9d9f4a

Browse files
committed
rerun example 2
Signed-off-by: Nitish Bharambe <[email protected]>
1 parent 8058be6 commit f9d9f4a

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

docs/examples/arrow_example.ipynb

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,18 @@
9090
"name": "stdout",
9191
"output_type": "stream",
9292
"text": [
93-
"node: ComponentMetaData(dtype=dtype([('id', '<i4'), ('u_rated', '<f8')], align=True), dtype_dict={'names': ['id', 'u_rated'], 'formats': ['<i4', '<f8'], 'offsets': [0, 8], 'itemsize': 16, 'aligned': True, 'nans': [-2147483648, nan]}, nans={'id': -2147483648, 'u_rated': nan}, nan_scalar=array([(-2147483648, nan)],\n",
94-
" dtype={'names': ['id', 'u_rated'], 'formats': ['<i4', '<f8'], 'offsets': [0, 8], 'itemsize': 16, 'aligned': True}))\n",
95-
"line: ComponentMetaData(dtype=dtype([('id', '<i4'), ('from_node', '<i4'), ('to_node', '<i4'), ('from_status', 'i1'), ('to_status', 'i1'), ('r1', '<f8'), ('x1', '<f8'), ('c1', '<f8'), ('tan1', '<f8'), ('r0', '<f8'), ('x0', '<f8'), ('c0', '<f8'), ('tan0', '<f8'), ('i_n', '<f8')], align=True), dtype_dict={'names': ['id', 'from_node', 'to_node', 'from_status', 'to_status', 'r1', 'x1', 'c1', 'tan1', 'r0', 'x0', 'c0', 'tan0', 'i_n'], 'formats': ['<i4', '<i4', '<i4', '<i1', '<i1', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8'], 'offsets': [0, 4, 8, 12, 13, 16, 24, 32, 40, 48, 56, 64, 72, 80], 'itemsize': 88, 'aligned': True, 'nans': [-2147483648, -2147483648, -2147483648, -128, -128, nan, nan, nan, nan, nan, nan, nan, nan, nan]}, nans={'id': -2147483648, 'from_node': -2147483648, 'to_node': -2147483648, 'from_status': -128, 'to_status': -128, 'r1': nan, 'x1': nan, 'c1': nan, 'tan1': nan, 'r0': nan, 'x0': nan, 'c0': nan, 'tan0': nan, 'i_n': nan}, nan_scalar=array([(-2147483648, -2147483648, -2147483648, -128, -128, nan, nan, nan, nan, nan, nan, nan, nan, nan)],\n",
96-
" dtype={'names': ['id', 'from_node', 'to_node', 'from_status', 'to_status', 'r1', 'x1', 'c1', 'tan1', 'r0', 'x0', 'c0', 'tan0', 'i_n'], 'formats': ['<i4', '<i4', '<i4', 'i1', 'i1', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8'], 'offsets': [0, 4, 8, 12, 13, 16, 24, 32, 40, 48, 56, 64, 72, 80], 'itemsize': 88, 'aligned': True}))\n",
97-
"source: ComponentMetaData(dtype=dtype([('id', '<i4'), ('node', '<i4'), ('status', 'i1'), ('u_ref', '<f8'), ('u_ref_angle', '<f8'), ('sk', '<f8'), ('rx_ratio', '<f8'), ('z01_ratio', '<f8')], align=True), dtype_dict={'names': ['id', 'node', 'status', 'u_ref', 'u_ref_angle', 'sk', 'rx_ratio', 'z01_ratio'], 'formats': ['<i4', '<i4', '<i1', '<f8', '<f8', '<f8', '<f8', '<f8'], 'offsets': [0, 4, 8, 16, 24, 32, 40, 48], 'itemsize': 56, 'aligned': True, 'nans': [-2147483648, -2147483648, -128, nan, nan, nan, nan, nan]}, nans={'id': -2147483648, 'node': -2147483648, 'status': -128, 'u_ref': nan, 'u_ref_angle': nan, 'sk': nan, 'rx_ratio': nan, 'z01_ratio': nan}, nan_scalar=array([(-2147483648, -2147483648, -128, nan, nan, nan, nan, nan)],\n",
98-
" dtype={'names': ['id', 'node', 'status', 'u_ref', 'u_ref_angle', 'sk', 'rx_ratio', 'z01_ratio'], 'formats': ['<i4', '<i4', 'i1', '<f8', '<f8', '<f8', '<f8', '<f8'], 'offsets': [0, 4, 8, 16, 24, 32, 40, 48], 'itemsize': 56, 'aligned': True}))\n",
99-
"asym_load: ComponentMetaData(dtype=dtype([('id', '<i4'), ('node', '<i4'), ('status', 'i1'), ('type', 'i1'), ('p_specified', '<f8', (3,)), ('q_specified', '<f8', (3,))], align=True), dtype_dict={'names': ['id', 'node', 'status', 'type', 'p_specified', 'q_specified'], 'formats': ['<i4', '<i4', '<i1', '<i1', '<(3,)f8', '<(3,)f8'], 'offsets': [0, 4, 8, 9, 16, 40], 'itemsize': 64, 'aligned': True, 'nans': [-2147483648, -2147483648, -128, -128, nan, nan]}, nans={'id': -2147483648, 'node': -2147483648, 'status': -128, 'type': -128, 'p_specified': nan, 'q_specified': nan}, nan_scalar=array([(-2147483648, -2147483648, -128, -128, [nan, nan, nan], [nan, nan, nan])],\n",
100-
" dtype={'names': ['id', 'node', 'status', 'type', 'p_specified', 'q_specified'], 'formats': ['<i4', '<i4', 'i1', 'i1', ('<f8', (3,)), ('<f8', (3,))], 'offsets': [0, 4, 8, 9, 16, 40], 'itemsize': 64, 'aligned': True}))\n"
93+
"node: {'names': ['id', 'u_rated'], 'formats': ['<i4', '<f8'], 'offsets': [0, 8], 'itemsize': 16, 'aligned': True}\n",
94+
"line: {'names': ['id', 'from_node', 'to_node', 'from_status', 'to_status', 'r1', 'x1', 'c1', 'tan1', 'r0', 'x0', 'c0', 'tan0', 'i_n'], 'formats': ['<i4', '<i4', '<i4', 'i1', 'i1', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8', '<f8'], 'offsets': [0, 4, 8, 12, 13, 16, 24, 32, 40, 48, 56, 64, 72, 80], 'itemsize': 88, 'aligned': True}\n",
95+
"source: {'names': ['id', 'node', 'status', 'u_ref', 'u_ref_angle', 'sk', 'rx_ratio', 'z01_ratio'], 'formats': ['<i4', '<i4', 'i1', '<f8', '<f8', '<f8', '<f8', '<f8'], 'offsets': [0, 4, 8, 16, 24, 32, 40, 48], 'itemsize': 56, 'aligned': True}\n",
96+
"asym_load: {'names': ['id', 'node', 'status', 'type', 'p_specified', 'q_specified'], 'formats': ['<i4', '<i4', 'i1', 'i1', ('<f8', (3,)), ('<f8', (3,))], 'offsets': [0, 4, 8, 9, 16, 40], 'itemsize': 64, 'aligned': True}\n"
10197
]
10298
}
10399
],
104100
"source": [
105-
"node_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.node]\n",
106-
"line_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.line]\n",
107-
"source_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.source]\n",
108-
"asym_load_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.asym_load]\n",
101+
"node_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.node].dtype\n",
102+
"line_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.line].dtype\n",
103+
"source_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.source].dtype\n",
104+
"asym_load_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.asym_load].dtype\n",
109105
"print(\"node:\", node_input_dtype)\n",
110106
"print(\"line:\", line_input_dtype)\n",
111107
"print(\"source:\", source_input_dtype)\n",
@@ -193,7 +189,7 @@
193189
},
194190
{
195191
"cell_type": "code",
196-
"execution_count": null,
192+
"execution_count": 4,
197193
"metadata": {},
198194
"outputs": [
199195
{
@@ -817,7 +813,7 @@
817813
{
818814
"data": {
819815
"text/plain": [
820-
"<pyarrow.lib.DoubleArray object at 0x00000184F527A680>\n",
816+
"<pyarrow.lib.DoubleArray object at 0x000001C42CB17820>\n",
821817
"[\n",
822818
" 1,\n",
823819
" 0.01,\n",

0 commit comments

Comments
 (0)