-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from glotzerlab/feature/improve_code_quality
Feature/improve code quality
- Loading branch information
Showing
27 changed files
with
1,459 additions
and
1,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,95 @@ | ||
# Copyright (c) 2019 The Regents of the University of Michigan | ||
# All rights reserved. | ||
# This software is licensed under the BSD 3-Clause License. | ||
R""" | ||
The core :py:mod:`rowan` package contains functions for operating on | ||
"""The rowan package for working with quaternions. | ||
The core :mod:`rowan` package contains functions for operating on | ||
quaternions. The core package is focused on robust implementations of key | ||
functions like multiplication, exponentiation, norms, and others. Simple | ||
functionality such as addition is inherited directly from NumPy due to | ||
the representation of quaternions as NumPy arrays. Many core NumPy functions | ||
implemented for normal arrays are reimplemented to work on quaternions ( | ||
such as :py:func:`allclose` and :py:func:`isfinite`). Additionally, `NumPy | ||
such as :func:`allclose` and :func:`isfinite`). Additionally, `NumPy | ||
broadcasting | ||
<https://docs.scipy.org/doc/numpy-1.14.0/user/basics.broadcasting.html#>`_ | ||
is enabled throughout rowan unless otherwise specified. This means that | ||
any function of 2 (or more) quaternions can take arrays of shapes that do | ||
not match and return results according to NumPy's broadcasting rules. | ||
""" | ||
|
||
from . import calculus | ||
from . import geometry | ||
from . import interpolate | ||
from . import mapping | ||
from . import random | ||
|
||
from .functions import (allclose, conjugate, divide, exp, expb, exp10, equal, | ||
from_axis_angle, from_euler, from_matrix, | ||
from_mirror_plane, inverse, isclose, isinf, isfinite, | ||
isnan, is_unit, log, logb, log10, multiply, norm, | ||
normalize, not_equal, power, reflect, rotate, | ||
to_axis_angle, to_euler, to_matrix, | ||
vector_vector_rotation) | ||
from . import calculus, geometry, interpolate, mapping, random | ||
from .functions import ( | ||
allclose, | ||
conjugate, | ||
divide, | ||
equal, | ||
exp, | ||
exp10, | ||
expb, | ||
from_axis_angle, | ||
from_euler, | ||
from_matrix, | ||
from_mirror_plane, | ||
inverse, | ||
is_unit, | ||
isclose, | ||
isfinite, | ||
isinf, | ||
isnan, | ||
log, | ||
log10, | ||
logb, | ||
multiply, | ||
norm, | ||
normalize, | ||
not_equal, | ||
power, | ||
reflect, | ||
rotate, | ||
to_axis_angle, | ||
to_euler, | ||
to_matrix, | ||
vector_vector_rotation, | ||
) | ||
|
||
# Get the version | ||
__version__ = '1.2.2' | ||
__version__ = "1.2.2" | ||
|
||
__all__ = ['calculus', 'geometry', 'interpolate', 'mapping', 'random', | ||
'allclose', 'conjugate', 'divide', 'exp', 'expb', 'exp10', 'equal', | ||
'from_axis_angle', 'from_euler', 'from_matrix', 'from_mirror_plane', | ||
'inverse', 'isclose', 'isinf', 'isfinite', 'isnan', 'is_unit', | ||
'log', 'logb', 'log10', 'multiply', 'norm', 'normalize', | ||
'not_equal', 'power', 'reflect', 'rotate', 'to_axis_angle', | ||
'to_euler', 'to_matrix', 'vector_vector_rotation'] | ||
__all__ = [ | ||
"calculus", | ||
"geometry", | ||
"interpolate", | ||
"mapping", | ||
"random", | ||
"allclose", | ||
"conjugate", | ||
"divide", | ||
"exp", | ||
"expb", | ||
"exp10", | ||
"equal", | ||
"from_axis_angle", | ||
"from_euler", | ||
"from_matrix", | ||
"from_mirror_plane", | ||
"inverse", | ||
"isclose", | ||
"isinf", | ||
"isfinite", | ||
"isnan", | ||
"is_unit", | ||
"log", | ||
"logb", | ||
"log10", | ||
"multiply", | ||
"norm", | ||
"normalize", | ||
"not_equal", | ||
"power", | ||
"reflect", | ||
"rotate", | ||
"to_axis_angle", | ||
"to_euler", | ||
"to_matrix", | ||
"vector_vector_rotation", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.