Skip to content

Commit 1a4f4cc

Browse files
author
Olivier Davant
committed
Update EX-2.08.04-IPA-CurvesAndSurfaces-Surfaces.ipynb
1 parent ddfbe92 commit 1a4f4cc

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

Examples/2-Content/2.08-IPA-CurvesAndSurfaces/EX-2.08.04-IPA-CurvesAndSurfaces-Surfaces.ipynb

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 4,
69+
"execution_count": 2,
7070
"metadata": {},
7171
"outputs": [],
7272
"source": [
7373
"import refinitiv.data as rd\n",
74-
"from refinitiv.data.content.ipa import surfaces"
74+
"from refinitiv.data.content.ipa import surfaces\n",
75+
"from refinitiv.data.content.ipa._enums import Axis"
7576
]
7677
},
7778
{
@@ -85,7 +86,7 @@
8586
},
8687
{
8788
"cell_type": "code",
88-
"execution_count": 5,
89+
"execution_count": 3,
8990
"metadata": {},
9091
"outputs": [
9192
{
@@ -94,7 +95,7 @@
9495
"<refinitiv.data.session.Definition object at 0x7fb2aeb727f0 {name='workspace'}>"
9596
]
9697
},
97-
"execution_count": 5,
98+
"execution_count": 4,
9899
"metadata": {},
99100
"output_type": "execute_result"
100101
}
@@ -112,7 +113,7 @@
112113
},
113114
{
114115
"cell_type": "code",
115-
"execution_count": 7,
116+
"execution_count": 5,
116117
"metadata": {},
117118
"outputs": [
118119
{
@@ -487,7 +488,7 @@
487488
"1.193120 9.238913 9.620762 10.056783 "
488489
]
489490
},
490-
"execution_count": 7,
491+
"execution_count": 6,
491492
"metadata": {},
492493
"output_type": "execute_result"
493494
}
@@ -513,44 +514,46 @@
513514
},
514515
{
515516
"cell_type": "code",
516-
"execution_count": 8,
517+
"execution_count": 7,
517518
"metadata": {},
518519
"outputs": [
519520
{
520-
"data": {
521-
"text/plain": [
522-
"<refinitiv.data.content.ipa._curves._models._curve.Curve at 0x7fb2aed24970>"
523-
]
524-
},
525-
"metadata": {},
526-
"output_type": "display_data"
521+
"name": "stdout",
522+
"output_type": "stream",
523+
"text": [
524+
"curve.x: [1.10383664 1.10941686 1.11499709 1.12057732 1.12615755 1.13173777\n",
525+
" 1.137318 1.14289823 1.14847846 1.15405868 1.15963891 1.16521914\n",
526+
" 1.17079937 1.17637959 1.18195982 1.18754005 1.19312027]\n",
527+
"curve.y: [10.39183978 10.36920782 10.34678789 10.32458262 10.30259475 10.28082708\n",
528+
" 10.25928247 10.23796387 10.21687428 10.19601678 10.17539451 10.15501066\n",
529+
" 10.13486849 10.1149713 10.09532244 10.07592531 10.05678332]\n"
530+
]
527531
}
528532
],
529533
"source": [
530534
"surface = response.data.surface\n",
531-
"curve = surface.get_curve(\"2018-15-10\", \"X\")\n",
532-
"display(curve)"
535+
"curve = surface.get_curve(\"2018-15-10\", Axis.X)\n",
536+
"print(\"curve.x: \", curve.x)\n",
537+
"print(\"curve.y: \", curve.y)"
533538
]
534539
},
535540
{
536541
"cell_type": "code",
537-
"execution_count": 9,
542+
"execution_count": 8,
538543
"metadata": {},
539544
"outputs": [
540545
{
541-
"data": {
542-
"text/plain": [
543-
"SurfacePoint(x=1.5395616e+18, y=38.25, z=10.056783324290427)"
544-
]
545-
},
546-
"metadata": {},
547-
"output_type": "display_data"
546+
"name": "stdout",
547+
"output_type": "stream",
548+
"text": [
549+
"x: 1.5395616e+18 y: 38.25\n"
550+
]
548551
}
549552
],
550553
"source": [
551554
"surface = response.data.surface\n",
552555
"point = surface.get_point(\"2018-15-10\", 38.25)\n",
553-
"display(point)"
556+
"print(\"x:\", point.x, \"y:\", point.y)"
554557
]
555558
},
556559
{
@@ -562,7 +565,7 @@
562565
},
563566
{
564567
"cell_type": "code",
565-
"execution_count": 10,
568+
"execution_count": 9,
566569
"metadata": {
567570
"pycharm": {
568571
"name": "#%%\n"

0 commit comments

Comments
 (0)