array
¶
Provide internal nodes for the Arrow-backed array runtime plus the higher- level ndarray abstraction layered on the canonical buffer/view substrate.
Classes:
-
ArrayInt32ArrayLength– -
NDArrayByteOffset– -
NDArrayElementCount– -
NDArrayIndex– -
NDArrayLiteral– -
NDArrayNDim– -
NDArrayRelease– -
NDArrayRetain– -
NDArrayShape– -
NDArrayStore– -
NDArrayStride– -
NDArrayType– -
NDArrayView–
ArrayInt32ArrayLength
¶
ArrayInt32ArrayLength(values: list[AST])
Bases: DataType
Build an int32 array using the IRx builtin array runtime, then return its length. attributes: values: type: list[astx.AST] type_: type: astx.Int32
Methods:
Source code in src/irx/astx/array.py
37 38 39 40 41 42 43 44 45 46 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
NDArrayByteOffset
¶
NDArrayByteOffset(base: AST, indices: Sequence[AST])
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 | |
NDArrayElementCount
¶
NDArrayElementCount(base: AST)
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
548 549 550 551 552 553 554 555 556 557 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
559 560 561 562 563 564 565 566 567 568 569 570 571 572 | |
NDArrayIndex
¶
NDArrayIndex(base: AST, indices: Sequence[AST])
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
NDArrayLiteral
¶
NDArrayLiteral(
values: Sequence[AST],
*,
element_type: DataType,
shape: Sequence[int],
strides: Sequence[int] | None = None,
offset_bytes: int = 0,
)
Bases: DataType
Build one flat Arrow array from scalar values, then attach ndarray shape and stride metadata over the resulting storage. attributes: values: type: list[astx.AST] element_type: type: astx.DataType shape: type: tuple[int, Ellipsis] strides: type: tuple[int, Ellipsis] | None offset_bytes: type: int type_: type: NDArrayType
Methods:
Source code in src/irx/astx/array.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
NDArrayNDim
¶
NDArrayNDim(base: AST)
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
405 406 407 408 409 410 411 412 413 414 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
416 417 418 419 420 421 422 423 424 425 426 427 428 429 | |
NDArrayRelease
¶
NDArrayRelease(base: AST)
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
689 690 691 692 693 694 695 696 697 698 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
700 701 702 703 704 705 706 707 708 709 710 711 712 713 | |
NDArrayRetain
¶
NDArrayRetain(base: AST)
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
648 649 650 651 652 653 654 655 656 657 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
659 660 661 662 663 664 665 666 667 668 669 670 671 672 | |
NDArrayShape
¶
NDArrayShape(base: AST, axis: int)
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
449 450 451 452 453 454 455 456 457 458 459 460 461 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | |
NDArrayStore
¶
NDArrayStore(base: AST, indices: Sequence[AST], value: AST)
Bases: DataType
Stores one scalar through ndarray shape and stride metadata. Arrow-backed ndarrays remain readonly in this phase, but the node keeps the surface aligned with future writable views. attributes: base: type: astx.AST indices: type: list[astx.AST] value: type: astx.AST type_: type: astx.Int32
Methods:
Source code in src/irx/astx/array.py
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | |
NDArrayStride
¶
NDArrayStride(base: AST, axis: int)
Bases: DataType
Methods:
Source code in src/irx/astx/array.py
500 501 502 503 504 505 506 507 508 509 510 511 512 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | |
NDArrayType
¶
NDArrayType(element_type: DataType | None = None)
Bases: AnyType
Represent the higher-level multidimensional array abstraction while reusing the canonical buffer/view representation during lowering. attributes: element_type: type: astx.DataType | None
Source code in src/irx/astx/array.py
82 83 84 85 86 87 88 89 90 | |
NDArrayView
¶
NDArrayView(
base: AST,
*,
shape: Sequence[int],
strides: Sequence[int] | None = None,
offset_bytes: int = 0,
)
Bases: DataType
Build one shallow ndarray view by reusing the base storage and replacing the logical shape, strides, and offset metadata. attributes: base: type: astx.AST shape: type: tuple[int, Ellipsis] strides: type: tuple[int, Ellipsis] | None offset_bytes: type: int type_: type: NDArrayType
Methods:
Source code in src/irx/astx/array.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in src/irx/astx/array.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | |