Skip to content

Commit

Permalink
feat: Add __array_wrap__ support & bump version
Browse files Browse the repository at this point in the history
- 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" 🆙
  • Loading branch information
horta committed Jan 7, 2025
1 parent 2fd3bb2 commit 8fd52de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions optimix/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Scalar(object):
"value",
"__array_interface__",
"__array_struct__",
"__array_wrap__",
"_bounds",
]

Expand All @@ -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):
Expand Down Expand Up @@ -165,6 +167,7 @@ class Vector(object):
"_fixed",
"__array_interface__",
"__array_struct__",
"__array_wrap__",
"value",
"_bounds",
]
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "optimix"
version = "3.0.5"
version = "3.0.6"
description = "Abstract function optimisation"
authors = ["Danilo Horta <danilo.horta@pm.me>"]
license = "MIT"
Expand Down

0 comments on commit 8fd52de

Please sign in to comment.