Skip to content

Commit

Permalink
Merge branch 'latest' into pass-model-name
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Sep 27, 2024
2 parents 6ab45a8 + 215b724 commit fd34feb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/highspy/highs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import annotations
import sys
import numpy as np
from numbers import Integral
from itertools import product
Expand All @@ -15,6 +16,11 @@
kHighsInf,
)

# backwards typing support information for HighspyArray
if sys.version_info >= (3, 9):
ndarray_object_type = np.ndarray[Any, np.dtype[np.object_]]
else:
ndarray_object_type = np.ndarray

class Highs(_Highs):
"""
Expand Down Expand Up @@ -1471,7 +1477,7 @@ def fire(
fn(e)


class HighspyArray(np.ndarray[Any, np.dtype[np.object_]]):
class HighspyArray(ndarray_object_type):
"""
A numpy array wrapper for highs_var/highs_linear_expression objects.
Expand Down

0 comments on commit fd34feb

Please sign in to comment.