Skip to content

Commit

Permalink
upgrade to python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
lejafar committed Apr 26, 2023
1 parent fd4d6ad commit d3185ab
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.11", "3.10", "3.9", "3.8", "3.7", "3.6", "3.5"]
python: ["3.10", "3.9", "3.8", "3.7", "3.6", "3.5"]
steps:
- uses: actions/checkout@v2
with:
Expand Down
128 changes: 128 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Python-OpenCTM

Python-OpenCTM is a Python interface for the [OpenCTM](https://github.com/Danny02/OpenCTM) file format. A format that allows a geometry to be compressed to a fraction of comparable file formats (3DS, STL, COLLADA...).

Pre-built python (**3.5**-**3.8**) wheels available for **Linux**, **MacOS** and **Windows**
Pre-built python (**3.5**-**3.10**) wheels available for **Linux**, **MacOS** and **Windows**

## Installation

Expand Down
6 changes: 3 additions & 3 deletions openctm/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ def import_mesh(_filename):
vertex_ctm = ctmGetFloatArray(ctm_context, CTM_VERTICES)

vertices = np.fromiter(vertex_ctm,
dtype=np.float,
dtype=float,
count=vertex_count * 3).reshape((-1, 3))

# read faces
face_count = ctmGetInteger(ctm_context, CTM_TRIANGLE_COUNT)
face_ctm = ctmGetIntegerArray(ctm_context, CTM_INDICES)
faces = np.fromiter(face_ctm, dtype=np.int,
faces = np.fromiter(face_ctm, dtype=int,
count=face_count * 3).reshape((-1, 3))

# read face normals
normals = None
if ctmGetInteger(ctm_context, CTM_HAS_NORMALS) == CTM_TRUE:
normals_ctm = ctmGetFloatArray(ctm_context, CTM_NORMALS)
normals = np.fromiter(normals_ctm,
dtype=np.float,
dtype=float,
count=face_count * 3).reshape((-1, 3))
finally:
ctmFreeContext(ctm_context)
Expand Down
2 changes: 1 addition & 1 deletion openctm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.11'
__version__ = '1.0.12'

0 comments on commit d3185ab

Please sign in to comment.