|
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | 7 | "# Multi-dimensional arrays and **Tensor** class\n", |
8 | | - "### Last modification (05.04.2018).\n", |
| 8 | + "### Last modification (14.04.2018).\n", |
9 | 9 | "\n", |
10 | 10 | "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", |
11 | 11 | "\n", |
|
40 | 40 | "\n", |
41 | 41 | "In order to create tensor using ``hottbox``, you simply need to pass numpy ndarray to the constructor of the ``Tensor`` class. \n", |
42 | 42 | "\n", |
43 | | - "> **Note:** the ND-array is stored in the attribute `data`.\n", |
44 | | - "\n", |
45 | 43 | "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", |
46 | 44 | "\n", |
47 | 45 | "> **Note:** In order to be consistent with python indexing, count of modes starts from zeros." |
|
548 | 546 | "cell_type": "markdown", |
549 | 547 | "metadata": {}, |
550 | 548 | "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." |
552 | 550 | ] |
553 | 551 | }, |
554 | 552 | { |
|
647 | 645 | "source": [ |
648 | 646 | "As expected, the result remains the same." |
649 | 647 | ] |
| 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 | + ] |
650 | 661 | } |
651 | 662 | ], |
652 | 663 | "metadata": { |
|
665 | 676 | "name": "python", |
666 | 677 | "nbconvert_exporter": "python", |
667 | 678 | "pygments_lexer": "ipython3", |
668 | | - "version": "3.6.5" |
| 679 | + "version": "3.6.2" |
669 | 680 | } |
670 | 681 | }, |
671 | 682 | "nbformat": 4, |
|
0 commit comments