# NuMojo V0.5 Complex Array, Readthedocs, and More!

**URL:** <https://forum.modular.com/t/numojo-v0-5-complex-array-readthedocs-and-more/484>\
**Category:** Community Showcase\
**Created:** [January 26, 2025, 3:27pm UTC](https://forum.modular.com/t/numojo-v0-5-complex-array-readthedocs-and-more/484 "2025-01-26T15:27:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MadAlex1997](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@MadAlex1997](https://forum.modular.com/u/MadAlex1997)\
**Post date:** [January 26, 2025, 3:27pm UTC](https://forum.modular.com/t/numojo-v0-5-complex-array-readthedocs-and-more/484/1 "2025-01-26T15:27:05Z")

</div>

# NuMojo v0.5 Release: Exciting New Features and Improvements

We’re thrilled to announce the release of **NuMojo v0.5** , packed with exciting new features, enhancements, and fixes designed to make working with numerical computations in Mojo more efficient and powerful. Below, we’ll dive into the highlights of this release. For more details, be sure to visit our updated [documentation site](https://numojo.readthedocs.io/en/latest/).

* * *

## ⭐ New Features

### Complex Arrays Support

NuMojo now supports complex number arrays with the introduction of `ComplexNDArray`, `ComplexSIMD`, and `CDType`. This includes creation routines for complex arrays, providing a robust foundation for advanced numerical computations.

### Type Coercion in Math Operations

We’ve added a `TypeCoercion` struct that automatically calculates the resultant type when performing operations between two different data types. Type coercion is now applied across all math functions for seamless operations.

### Enhanced Data Buffer Management

The new `OwnData` type serves as a container for data buffers in `NDArray` and `Matrix`, replacing `UnsafePointer`. This enhancement paves the way for array views and better memory management in the future.

### Iterators for Arrays

Introducing `NDIter`, an iterator for traversing array items based on memory layout. Use `NDArray.nditer()` to leverage this feature for more flexible data traversal.

### Tensor Conversion

Easily convert between `NDArray` and MAX `Tensor` using the new `to_tensor` and `from_tensor` functions.

### Linear Algebra Enhancements

- **Determinant Calculation** : Use the `det` function for matrix determinant calculations.
- **QR Decomposition** : Implemented Householder-based QR decomposition for efficient matrix factorization.

* * *

## 🦋 Changes and Improvements

### Array Manipulation

- **Memory Layout Flags** : Added a `flags` property to `NDArray` and `Matrix`, storing details about memory layout (e.g., C-continuous, F-continuous).
- **Reshape Improvements** : Refined `reshape`, `resize`, `flatten`, and `ravel` to work with any dimensions and orders.

### Updated Methods

- **Safe `load` and `store`** : Renamed and enhanced the safety of these methods by adding boundary checks.
- **Advanced Indexing** : Expanded support for indexing with lists, multi-dimensional arrays, and boolean masks.

### Print Customization

Added `PrintOption` for controlling string representations of arrays, shapes, and strides, with customizable formatting options.

* * *

## ❌ Deprecated or Removed

- The `order` and `datatype` properties of `NDArray` have been replaced with the more robust `flags` and `dtype` properties.
- Removed `offset` and `coefficient` properties in favor of simplified memory layout management.

* * *

## 🛠 Fixes

- Fixed an issue where negative index values caused overflows in `get` and `set` methods.
- Enhanced ` __setitem__ ` to handle variants of integers and slices more effectively.

* * *

## 📚 Documentation Updates

We’ve launched our official [documentation site](https://numojo.readthedocs.io/en/latest/)! This includes:

- Comprehensive guides for all NuMojo features.
- Examples and tutorials for getting started with new APIs.
- Detailed descriptions of recent changes and enhancements.

* * *

We hope you enjoy the new features and improvements in NuMojo v0.5! Don’t forget to explore our documentation for in-depth insights.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex001/uploads/modular/original/1X/2751e0fbdc595a99718b216730957e9db4448cfd.jpeg) [@system](https://forum.modular.com/u/system)\
**Post date:** [July 25, 2025, 3:27pm UTC](https://forum.modular.com/t/numojo-v0-5-complex-array-readthedocs-and-more/484/2 "2025-07-25T15:27:53Z")

</div>

Closed on July 25, 2025, 3:27pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
