Skip to content

Commit 67e854b

Browse files
committed
version 1.0.0
1 parent 84db750 commit 67e854b

File tree

16 files changed

+794
-381
lines changed

16 files changed

+794
-381
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ and running the following in the cloned repo:
3434
To define a subspace of $ℝ^n$ or $ℂ^n$, use ``fn``
3535

3636
```python
37-
>>> V = fn('V', R, 3)
37+
>>> V = fn("V", R, 3)
3838
>>> print(V.info())
3939
```
4040

@@ -50,7 +50,7 @@ To define a subspace of $ℝ^n$ or $ℂ^n$, use ``fn``
5050
You can provide a list of constraints
5151

5252
```python
53-
>>> U = fn('U', R, 3, constraints=['v0 == 0', '2*v1 == v2'])
53+
>>> U = fn("U", R, 3, constraints=["v0 == 0", "2*v1 == v2"])
5454
>>> print(U.info())
5555
```
5656

@@ -66,7 +66,7 @@ You can provide a list of constraints
6666
Or specify a basis
6767

6868
```python
69-
>>> W = fn('W', R, 3, basis=[[1, 0, 0], [0, 1, 0]])
69+
>>> W = fn("W", R, 3, basis=[[1, 0, 0], [0, 1, 0]])
7070
>>> print(W.info())
7171
```
7272

@@ -240,7 +240,7 @@ Take the span of a list of vectors
240240

241241

242242
```python
243-
>>> S = V.span('S', [1, 2, 3], [4, 5, 6])
243+
>>> S = V.span("S", [1, 2, 3], [4, 5, 6])
244244
>>> print(S.info())
245245
```
246246

@@ -259,7 +259,7 @@ Take the span of a list of vectors
259259
>>> def mapping(vec):
260260
>>> return [vec[0], vec[1], 0]
261261
>>>
262-
>>> T = LinearMap('T', domain=V, codomain=W, mapping=mapping)
262+
>>> T = LinearMap("T", domain=V, codomain=W, mapping=mapping)
263263
>>> print(T.info())
264264
```
265265

@@ -332,7 +332,7 @@ Here we define the standard dot product
332332
>>> def mapping(vec1, vec2):
333333
>>> return sum(i * j for i, j in zip(vec1, vec2))
334334
>>>
335-
>>> dot = InnerProduct('dot', vectorspace=V, mapping=mapping)
335+
>>> dot = InnerProduct("dot", vectorspace=V, mapping=mapping)
336336
>>> print(dot.info())
337337
```
338338

@@ -410,7 +410,7 @@ Take the orthogonal complement of a vector space
410410
>>> def mapping(vec):
411411
>>> return [vec[0], 2*vec[1], 3*vec[2]]
412412
>>>
413-
>>> T = LinearOperator('T', vectorspace=V, mapping=mapping)
413+
>>> T = LinearOperator("T", vectorspace=V, mapping=mapping)
414414
>>> print(T.info())
415415
```
416416

ablina/__init__.py

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
1-
__version__ = '0.4.3'
2-
__author__ = 'Daniyal Akif'
3-
__email__ = '[email protected]'
4-
__license__ = 'MIT'
5-
__description__ = 'A Python package for abstract linear algebra'
6-
__url__ = 'https://github.com/daniyal1249/ablina'
1+
__version__ = "1.0.0"
2+
__author__ = "Daniyal Akif"
3+
__email__ = "[email protected]"
4+
__license__ = "MIT"
5+
__description__ = "A Python package for abstract linear algebra"
6+
__url__ = "https://github.com/daniyal1249/ablina"
77

88

9-
from .field import Field, R, C
10-
from .form import SesquilinearForm, InnerProduct, QuadraticForm
9+
from .field import Field, Reals, Complexes, R, C
10+
from .form import (
11+
FormError, InnerProductError, SesquilinearForm, InnerProduct, QuadraticForm
12+
)
1113
from .linearmap import (
12-
LinearMap, LinearOperator, LinearFunctional, Isomorphism, IdentityMap
14+
LinearMapError, LinearMap, LinearOperator, LinearFunctional, Isomorphism,
15+
IdentityMap
1316
)
14-
from .mathset import Set, negate
17+
from .mathset import Set, negate, remove_duplicates
1518
from .matrix import Matrix, M
19+
from .parser import ParsingError, ConstraintError, sympify, split_constraint
20+
from .utils import (
21+
symbols, is_linear, is_empty, is_invertible, is_orthogonal, is_unitary,
22+
is_normal, rref, of_arity, add_attributes
23+
)
1624
from .vectorspace import (
17-
Fn, VectorSpace, AffineSpace, fn, matrix_space, poly_space, hom,
18-
is_vectorspace, columnspace, rowspace, nullspace, left_nullspace,
19-
image, kernel
25+
NotAVectorSpaceError, Fn, VectorSpace, AffineSpace, fn, matrix_space,
26+
poly_space, hom, is_vectorspace, columnspace, rowspace, nullspace,
27+
left_nullspace, image, kernel
2028
)
29+
from .vs_utils import to_ns_matrix, to_complement
30+
2131

2232
__all__ = [
23-
'Field', 'R', 'C',
24-
'SesquilinearForm', 'InnerProduct', 'QuadraticForm',
25-
'LinearMap', 'LinearOperator', 'LinearFunctional', 'Isomorphism',
26-
'IdentityMap',
27-
'Set', 'negate',
28-
'Matrix', 'M',
29-
'Fn', 'VectorSpace', 'AffineSpace', 'fn', 'matrix_space', 'poly_space',
30-
'hom', 'is_vectorspace', 'columnspace', 'rowspace', 'nullspace',
31-
'left_nullspace', 'image', 'kernel'
33+
"Field", "Reals", "Complexes", "R", "C",
34+
"FormError", "InnerProductError", "SesquilinearForm", "InnerProduct", "QuadraticForm",
35+
"LinearMapError", "LinearMap", "LinearOperator", "LinearFunctional", "Isomorphism",
36+
"IdentityMap",
37+
"Set", "negate", "remove_duplicates",
38+
"Matrix", "M",
39+
"ParsingError", "ConstraintError", "sympify", "split_constraint",
40+
"symbols", "is_linear", "is_empty", "is_invertible", "is_orthogonal", "is_unitary",
41+
"is_normal", "rref", "of_arity", "add_attributes",
42+
"NotAVectorSpaceError", "Fn", "VectorSpace", "AffineSpace", "fn", "matrix_space",
43+
"poly_space", "hom", "is_vectorspace", "columnspace", "rowspace", "nullspace",
44+
"left_nullspace", "image", "kernel",
45+
"to_ns_matrix", "to_complement"
3246
]

0 commit comments

Comments
 (0)