- Require Python 3.
- Remove
vg.orient()
(replace withvg.aligned_with()
) - Remove
vg.matrix.transform()
(replace withpolliwog.transform.apply_transform()
) - Remove
vg.matrix.pad_with_ones()
andvg.matrix.unpad()
(no replacement offered) - Remove
vg.__version__
.
- Add v2 forward-compatibility layer. When updating libraries to use
vg>=2.0
, ensure you are not using any of the functions removed in v2, and update your imports tofrom vg.compat import v2 as vg
. Applications can do the same orimport vg
. See Future-proofing your application or library for more explanation of the forward-compatibility layer.
See release notes for 2.0.0.
- Fix
vg.compat.v1.shape.*
andvg.compat.v1.matrix.*
.
-
Starting with this release, all libraries depending on
vg
are encouraged to use the new forward-compatibility layer. Replaceimport vg
withfrom vg.compat import v1 as vg
and use>=1.11
as your dependency specifier. You can also replace 1.11 with a later version which includes a feature you need. The important thing is not to use>=1.11,<2
. Since this project guarantees thatfrom vg.compat import v1 as vg
will continue to work the same in 2.0+, the<2
constraint provides no stability value – and it makes things unnecessarily difficult for consumers who use multiple dependencies withvg
.Applications have two options:
- Follow the recommendation for libraries: specify
>=1.11
and import usingfrom vg.compat import v1 as vg
. This option provides better code stability and makes upgrades seamless. - Specify
>=1.11,<2
and useimport vg
directly, and when upgrading to>=2,<3
, review the changelog and modify the calling code if necessary. This option ensures you stay up to date with the recommended, friendliest interface for calling intovg
.
- Follow the recommendation for libraries: specify
-
Rename
vg.orient()
tovg.aligned_with()
.vg.orient()
will be removed in vg 2. -
Deprecate
vg.matrix.pad_with_ones()
,vg.matrix.unpad()
, andvg.matrix.transform()
(in favor ofpolliwog.transform.apply_transform()
). These functions will be removed in vg 2. (See lace/polliwog#113 for additional context on whypad_with_ones()
andunpad()
are being removed.)
- Add
vg.compat
forward-compatibility layer for libraries.
- Clarify what goes in vg vs. what goes in polliwog.
- Add
vg.apex_and_opposite()
, which is likevg.apex()
except it returns both extreme points.
- Add
vg.argapex()
, which is likevg.apex()
except it returns the index instead of the point.
- Add
vg.shape.columnize()
, a helper function for functions which may, accept and return a stack of points or a single point. - Add
vg.shape.check_value_any()
for checking an input against multiple valid shape. - Fix
vg.euclidean_distance()
so it will correctly accept a single point as the first argument with a stack of points as the second argument. - Correct many erroneous mentions of
3x1
andkx1
in the documentation and error messages.
- Add
vg.average()
. vg.apex()
: Return a copy instead of a view.- Improve documentation intro.
- Distribute universal wheels.
- Fix
vg.nearest()
andvg.farthest()
withret_index=False
- Allow
vg.scale_factor()
to accept a mix of stacked and unstacked inputs.
- Add
vg.nearest()
. - Add
vg.scale_factor()
. - Add
vg.orient()
. - Improve documentation, including docs for
vg.almost_collinear()
.
vg.scalar_projection
andvg.project
: Allow stacked inputs foronto
whenvector
is also stacked.
Same as 1.2.2 but republished to reflect correct semver.
- Add
vg.euclidean_distance
. - Fix encoding error during installation on Windows 10.
- Fix
vg.shape.check
for scalars.
- Add
vg.cross
andvg.dot
. - Allow
vg.perpendicular
to accept a mix of stacked and unstacked inputs.
- Add
vg.almost_unit_length
- Add
vg.within
- BREAKING CHANGE: Rename
vg.proj()
->vg.project()
. - BREAKING CHANGE: Rename
vg.sproj()
->vg.scalar_projection()
. - BREAKING CHANGE: Move matrix functions into namespace.
- BREAKING CHANGE: Give second argument to
vg.apex()
a better name - Add
vg.almost_equal()
. - Improve documentation.
- Add
vg.shape.check()
andvg.shape.check_value()
- Again, fix concurrent install with numpy by avoiding numpy import during install.
- Fix concurrent install with numpy by avoiding numpy import during install.
- Add
vg.apex()
andvg.farthest()
- Fix documentation typos.
- Update dev dependencies.
- Add
vg.perpendicular()
for computing the vector perpendicular to two others. - Add
vg.rotate()
for rotating a point or vector some number of degrees (or radians) around an axis. - Add "before and after" examples to the docs.
- 100% code coverage.
- Add principal-component-analysis functions
principal_components()
andmajor_axis()
.
- Vectorize
angle()
andunsigned_angle()
and improve documentation and test coverage. - Test the return type for
magnitude()
and improve documentation. - Present documentation on a single page.
- Other doc improvements.
Initial release.