{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "cddd693e-f58d-4e6a-85f0-3c7682fc66bb", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "CartesianIndex(2, 3, 4)" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ci = CartesianIndex(2, 3, 4)" ] }, { "cell_type": "code", "execution_count": 2, "id": "e1713dde-22a7-460e-8610-fb91df4d9734", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CartesianIndex{3}\n", " I: Tuple{Int64, Int64, Int64}\n", " 1: Int64 2\n", " 2: Int64 3\n", " 3: Int64 4\n" ] } ], "source": [ "dump(ci)" ] }, { "cell_type": "code", "execution_count": 3, "id": "7d084efc-d67b-4a79-9ea6-539569d61532", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(2, 3, 4)" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Tuple(ci)" ] }, { "cell_type": "code", "execution_count": 4, "id": "4a0e2875-5a00-434d-a39d-c33d3b35a75f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3-element Vector{Int64}:\n", " 2\n", " 3\n", " 4" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "collect(Tuple(ci))" ] }, { "cell_type": "code", "execution_count": null, "id": "0c8ba67e-cbd5-4185-b24f-f4136532447d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "jupytext": { "formats": "ipynb,auto:hydrogen" }, "kernelspec": { "display_name": "Julia 1.6.1", "language": "julia", "name": "julia-1.6" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.6.1" } }, "nbformat": 4, "nbformat_minor": 5 }