Skip to content

Commit 077e412

Browse files
committed
Extended discritions of usage of tensor classes
1 parent e198f49 commit 077e412

File tree

2 files changed

+313
-62
lines changed

2 files changed

+313
-62
lines changed

1_N-dimensional_arrays_and_Tensor_class.ipynb

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"metadata": {},
66
"source": [
77
"# Multi-dimensional arrays and **Tensor** class\n",
8-
"### Last modification (05.04.2018).\n",
8+
"### Last modification (14.04.2018).\n",
99
"\n",
1010
"In this tutorial we will show the core data structures of multidimenaional arrays within tensor algebra and illustrate how they are integrated into [hottbox](https://github.com/hottbox/hottbox). For more details visit the [documentation page](https://hottbox.github.io/stable/api/hottbox.core.html#module-hottbox.core).\n",
1111
"\n",
@@ -40,8 +40,6 @@
4040
"\n",
4141
"In order to create tensor using ``hottbox``, you simply need to pass numpy ndarray to the constructor of the ``Tensor`` class. \n",
4242
"\n",
43-
"> **Note:** the ND-array is stored in the attribute `data`.\n",
44-
"\n",
4543
"This will allow you to use top level API for the most common properties and operations on the tensor itself that correspond to the conventional definitions. \n",
4644
"\n",
4745
"> **Note:** In order to be consistent with python indexing, count of modes starts from zeros."
@@ -548,7 +546,7 @@
548546
"cell_type": "markdown",
549547
"metadata": {},
550548
"source": [
551-
"Here, despite the **`Y`** and **`Z`** are being different objects, their attribute **`data`** will have the same values."
549+
"Here, despite the **`Y`** and **`Z`** are being different objects, their data values will remaain the same."
552550
]
553551
},
554552
{
@@ -647,6 +645,19 @@
647645
"source": [
648646
"As expected, the result remains the same."
649647
]
648+
},
649+
{
650+
"cell_type": "markdown",
651+
"metadata": {},
652+
"source": [
653+
"## Additional notes on API of **Tensor** class\n",
654+
"\n",
655+
"1. When object of **`Tensor`** class is created, the data values are stored in **`_data`** attribute and should only be accessed by calling the corresponding property **`data`**, as has been shown previously. \n",
656+
"\n",
657+
"- If you want to modify these values, then call the corresponding transformation method available for the **`Tensor`** class.\n",
658+
"\n",
659+
"- In order to create a duplicate of an object of **`Tensor`** class then use method **`copy()`**"
660+
]
650661
}
651662
],
652663
"metadata": {
@@ -665,7 +676,7 @@
665676
"name": "python",
666677
"nbconvert_exporter": "python",
667678
"pygments_lexer": "ipython3",
668-
"version": "3.6.5"
679+
"version": "3.6.2"
669680
}
670681
},
671682
"nbformat": 4,

0 commit comments

Comments
 (0)