Skip to content

Commit

Permalink
rerun example 2
Browse files Browse the repository at this point in the history
Signed-off-by: Nitish Bharambe <[email protected]>
  • Loading branch information
nitbharambe committed Oct 23, 2024
1 parent 8058be6 commit f9d9f4a
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions docs/examples/arrow_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,18 @@
"name": "stdout",
"output_type": "stream",
"text": [
"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",
" dtype={'names': ['id', 'u_rated'], 'formats': ['<i4', '<f8'], 'offsets': [0, 8], 'itemsize': 16, 'aligned': True}))\n",
"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",
" 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",
"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",
" 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",
"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",
" 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"
"node: {'names': ['id', 'u_rated'], 'formats': ['<i4', '<f8'], 'offsets': [0, 8], 'itemsize': 16, 'aligned': True}\n",
"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",
"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",
"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"
]
}
],
"source": [
"node_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.node]\n",
"line_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.line]\n",
"source_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.source]\n",
"asym_load_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.asym_load]\n",
"node_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.node].dtype\n",
"line_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.line].dtype\n",
"source_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.source].dtype\n",
"asym_load_input_dtype = power_grid_meta_data[DatasetType.input][ComponentType.asym_load].dtype\n",
"print(\"node:\", node_input_dtype)\n",
"print(\"line:\", line_input_dtype)\n",
"print(\"source:\", source_input_dtype)\n",
Expand Down Expand Up @@ -193,7 +189,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -817,7 +813,7 @@
{
"data": {
"text/plain": [
"<pyarrow.lib.DoubleArray object at 0x00000184F527A680>\n",
"<pyarrow.lib.DoubleArray object at 0x000001C42CB17820>\n",
"[\n",
" 1,\n",
" 0.01,\n",
Expand Down

0 comments on commit f9d9f4a

Please sign in to comment.