From 8fd52deba695715c16ace6e71a5989d451522f9a Mon Sep 17 00:00:00 2001 From: Danilo Horta Date: Tue, 7 Jan 2025 15:13:18 +0000 Subject: [PATCH] feat: Add __array_wrap__ support & bump version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added `__array_wrap__` to `Scalar` and `Vector` object structures in `optimix/_types.py` ✨ - Updated `pyproject.toml` version from "3.0.5" to "3.0.6" 🆙 --- optimix/_types.py | 4 ++++ pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/optimix/_types.py b/optimix/_types.py index c7290a6..6489932 100644 --- a/optimix/_types.py +++ b/optimix/_types.py @@ -20,6 +20,7 @@ class Scalar(object): "value", "__array_interface__", "__array_struct__", + "__array_wrap__", "_bounds", ] @@ -33,6 +34,7 @@ def __init__(self, value): self.raw = value self.__array_interface__ = value.__array_interface__ self.__array_struct__ = value.__array_struct__ + self.__array_wrap__ = value.__array_wrap__ @property def bounds(self): @@ -165,6 +167,7 @@ class Vector(object): "_fixed", "__array_interface__", "__array_struct__", + "__array_wrap__", "value", "_bounds", ] @@ -180,6 +183,7 @@ def __init__(self, value): self.raw = value self.__array_interface__ = value.__array_interface__ self.__array_struct__ = value.__array_struct__ + self.__array_wrap__ = value.__array_wrap__ @property def bounds(self): diff --git a/pyproject.toml b/pyproject.toml index 1daf998..29687e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "optimix" -version = "3.0.5" +version = "3.0.6" description = "Abstract function optimisation" authors = ["Danilo Horta "] license = "MIT"