Skip to content

Commit 247c55d

Browse files
akaszynskigerma89
andauthored
Use latest grpc package (#970)
* clean up symmetric method * Removing breakpoint Co-authored-by: German <[email protected]>
1 parent 345f1c1 commit 247c55d

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ maintainers = [
1717
{name = "PyAnsys developers", email = "[email protected]"},
1818
]
1919
dependencies = [
20-
"ansys-api-mapdl-v0==0.4.1", # supports at least 2020R2 - 2021R2
20+
"ansys-api-mapdl==0.5.1", # supports at least 2020R2 - 2022R1
2121
"ansys-corba; python_version < '3.9'",
2222
"ansys-mapdl-reader>=0.50.15",
2323
"appdirs>=1.4.0",

src/ansys/mapdl/core/math.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,19 +1442,26 @@ def shape(self) -> tuple:
14421442
"""
14431443
return (self.nrow, self.ncol)
14441444

1445-
def sym(self): # BUG this is not always true
1446-
"""Return if matrix is symmetric."""
1445+
def sym(self) -> bool:
1446+
"""Return if matrix is symmetric.
1447+
1448+
Returns
1449+
-------
1450+
bool
1451+
``True`` when this matrix is symmetric.
1452+
1453+
"""
14471454

14481455
info = self._mapdl._data_info(self.id)
14491456

14501457
if meets_version(self._mapdl._server_version, (0, 5, 0)): # pragma: no cover
14511458
return info.mattype in [0, 1, 2] # [UPPER, LOWER, DIAG] respectively
1452-
else:
1453-
warn(
1454-
"Call to sym() function cannot evaluate if"
1455-
"it is symmetric or not in this MAPDL version."
1456-
)
1457-
return True
1459+
1460+
warn(
1461+
"Call to ``sym`` cannot evaluate if this matrix "
1462+
"is symmetric with this version of MAPDL."
1463+
)
1464+
return True
14581465

14591466
def asarray(self, dtype=None) -> np.ndarray:
14601467
"""Returns vector as a numpy array.

0 commit comments

Comments
 (0)