Skip to content

Commit fb283b3

Browse files
committed
Bump version to 0.1.1
2 parents f93e917 + 8e4c7a4 commit fb283b3

File tree

14 files changed

+132
-30
lines changed

14 files changed

+132
-30
lines changed

.github/workflows/ci_cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,14 @@ jobs:
337337

338338

339339
release:
340-
name: "Release project to private PyPI and GitHub"
340+
name: "Release project to public PyPI and GitHub"
341341
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
342342
needs: [package]
343343
runs-on: ubuntu-latest
344344
steps:
345345

346346
- name: "Release to the public PyPI repository"
347-
uses: pyansys/actions/release-pypi-public@v3
347+
uses: pyansys/actions/release-pypi-public@v4
348348
with:
349349
library-name: ${{ env.PACKAGE_NAME }}
350350
twine-username: "__token__"

.github/workflows/label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
needs: labeler
7373
steps:
7474
- name: Suggest to add labels
75-
uses: peter-evans/create-or-update-comment@v2
75+
uses: peter-evans/create-or-update-comment@v3
7676
# Execute only when no labels have been applied to the pull request
7777
if: toJSON(github.event.pull_request.labels.*.name) == '{}'
7878
with:

README.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
PyAnsys Math
22
============
33

4-
|pyansys| |pypi| |PyPIact| |GH-CI| |codecov| |MIT| |black|
4+
|pyansys| |pypi| |GH-CI| |codecov| |MIT| |black|
55

66
.. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
77
:target: https://docs.pyansys.com/
88
:alt: PyAnsys
99

10-
.. |pypi| image:: https://img.shields.io/pypi/v/pyansys-math-core.svg?logo=python&logoColor=white
11-
:target: https://pypi.org/project/ansys-math-core/
12-
13-
.. |PyPIact| image:: https://img.shields.io/pypi/dm/pyansys-math-core.svg?label=PyPI%20downloads
10+
.. |pypi| image:: https://img.shields.io/pypi/v/ansys-math-core.svg?logo=python&logoColor=white
1411
:target: https://pypi.org/project/ansys-math-core/
1512

1613
.. |codecov| image:: https://codecov.io/gh/pyansys/pyansys-math/branch/main/graph/badge.svg
@@ -43,6 +40,11 @@ For users
4340
The ``ansys.math.core`` package currently supports Python 3.7 through
4441
Python 3.10 on Windows, Mac OS, and Linux.
4542

43+
.. warning::
44+
45+
``ansys.math.core`` will no longer support Python 3.7 by June 2023.
46+
47+
4648
Install the latest package for use with this command:
4749

4850
.. code::
@@ -80,7 +82,7 @@ Verify your installation
8082

8183
Check that you can start PyAnsys Math from Python by running this code:
8284

83-
.. code:: python
85+
.. code:: python3
8486
8587
import ansys.math.core.math as pymath
8688
File renamed without changes.
File renamed without changes.

doc/source/contributing/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ templates:
3232

3333
If your issue does not fit into one of these categories, create your own issue.
3434

35-
To reach the PyAnsys support team, email `pyansys.support@ansys.com <pyansys_support_>`_.
35+
To reach the PyAnsys support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>`_.
3636

3737

3838
Build documentation

doc/source/index.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ the NumPy and SciPy linear algebra solvers and the PyAnsys Math solver:
3333
+--------------------------------------------+-----------------------------------+
3434
| NumPy and SciPy | PyAnsys Math |
3535
+============================================+===================================+
36-
| .. code:: python | .. code:: python |
36+
| .. code:: python3 | .. code:: python3 |
3737
| | |
3838
| k_py = k + sparse.triu(k, 1).T | k = mm.matrix(k_py, triu=True) |
3939
| m_py = m + sparse.triu(m, 1).T | m = mm.matrix(m_py, triu=True) |
@@ -63,7 +63,7 @@ Quick code
6363

6464
Here is a brief example of how you use PyAnsys Math:
6565

66-
.. code:: python
66+
.. code:: python3
6767
6868
import ansys.math.core.math as pymath
6969
@@ -75,7 +75,9 @@ Here is a brief example of how you use PyAnsys Math:
7575
7676
print(w)
7777
78-
.. code:: output
78+
.. rst-class:: sphx-glr-script-out
79+
80+
.. code-block:: none
7981
8082
UDWZKD :
8183
Size : 5
@@ -90,6 +92,7 @@ For comprehensive PyAnsys Math examples, see :ref:`ref_pymath_examples`.
9092
:maxdepth: 1
9193

9294
getting_started/index
93-
api_ref/index
95+
user_guide/index
96+
api/index
9497
examples/index
9598
contributing/index

doc/source/user_guide/arrays.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
Handling arrays between PyAnsys Math and Python
3+
===============================================
4+
5+
6+
Sending arrays to PyAnsys Math
7+
------------------------------
8+
9+
.. code:: python3
10+
11+
import numpy as np
12+
import ansys.math.core.math as pymath
13+
14+
# Start PyAnsys Math as a service.
15+
mm = pymath.AnsMath()
16+
17+
a = np.random.random((2, 3))
18+
a_pymath = mm.matrix(a, name="A")
19+
20+
print(a_pymath)
21+
22+
.. rst-class:: sphx-glr-script-out
23+
24+
.. code-block:: none
25+
26+
A:
27+
[1,1]: 4.018e-01 [1,2]: 4.635e-01 [1,3]: 3.682e-01
28+
[2,1]: 9.711e-01 [2,2]: 7.601e-02 [2,3]: 8.833e-01
29+
30+
31+
32+
Transfer a PyAnsys Math matrix to NumPy
33+
---------------------------------------
34+
35+
.. code:: python3
36+
37+
a_python = a_pymath.asarray()
38+
print((a == a_python).all())
39+
40+
41+
.. rst-class:: sphx-glr-script-out
42+
43+
.. code-block:: none
44+
45+
True
46+
47+
48+
49+
50+

doc/source/user_guide/index.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. _ref_user_guide:
2+
3+
User guide
4+
==========
5+
6+
Overview
7+
--------
8+
9+
You can use the ``AnsMath()`` method to launch an instance of PyAnsys Math.
10+
11+
.. code:: python3
12+
13+
import ansys.math.core.math as pymath
14+
15+
# Start PyAnsys Math.
16+
mm = pymath.AnsMath()
17+
print(mm)
18+
19+
.. rst-class:: sphx-glr-script-out
20+
21+
.. code-block:: none
22+
23+
APDLMATH PARAMETER STATUS- ( 0 PARAMETERS DEFINED)
24+
25+
Name Type Mem. (MB) Dims Workspace
26+
27+
.. toctree::
28+
:hidden:
29+
:maxdepth: 1
30+
31+
arrays.rst

examples/scipy_sparse_matrix.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
out = mm._mapdl.input(vmfiles["vm153"])
2929
k = mm.stiff(fname="PRSMEMB.full")
30-
k
3130

3231
################################################################################
3332
# Copy AnsMath sparse matrix to SciPy CSR matrix and plot
@@ -36,7 +35,7 @@
3635
# graph of the sparse matrix.
3736

3837
pk = k.asarray()
39-
plt.spy(pk, color="orange")
38+
plt.spy(pk, color="orange", markersize=3)
4039
plt.title("AnsMath sparse matrix")
4140
plt.show()
4241

0 commit comments

Comments
 (0)