{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# FixeArray Collection" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from byteclasses.print import byteclass_info, byteclass_inspect\n", "from byteclasses.types.collections import ByteArray\n", "from byteclasses.types.primitives.floats import Float32\n", "from byteclasses.types.primitives.integers import UInt16" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fa1 = ByteArray(8, UInt16)\n", "fa1[1] = 0xAAAA\n", "fa1[3] = 0xBBBB\n", "fa1[5] = 0xCCCC\n", "fa1[7] = 0xFFFF\n", "byteclass_info(fa1)\n", "byteclass_inspect(fa1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fa2 = ByteArray(8, Float32)\n", "fa2[1] = 0xAAAA\n", "fa2[3] = 0xBBBB\n", "fa2[5] = 0xCCCC\n", "fa2[7] = 0xFFFF\n", "byteclass_info(fa2)\n", "byteclass_inspect(fa2)" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.9" } }, "nbformat": 4, "nbformat_minor": 2 }