Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meaningless operations (e.g. vector-vector product) produce result #1

Open
goretkin opened this issue Jul 23, 2020 · 2 comments
Open

Comments

@goretkin
Copy link

I could be mistaken, but I expected errors here:

using TensorAlgebra: VectorSpace, Covector

V = VectorSpace(:V,Float64)
v = Vector(V,[1,2,3])
α = Covector(V,[1,2,3])

@show v(v)
@show α(α)
v(v) = 14.0
α(α) = 14.0

Or I expected something like an outer product e.g.

julia> Float64[1,2,3] * Float64[1,2,3]'
3×3 Array{Float64,2}:
 1.0  2.0  3.0
 2.0  4.0  6.0
 3.0  6.0  9.0
@EricForgy
Copy link
Owner

Hi @goretkin ,

Yep. That is a bug. Thanks. I made some last minute changes and must have broke it. I'll fix it now. Thanks for looking at it 👍🙏

@EricForgy
Copy link
Owner

It should be fixed now. That is embarrassing and I'm really sorry about that. I was rushing because I need to work on something else and announced it without running the tests. Tests can always be improved, but I had fairly comprehensive tests that catch this. I just didn't run them after the latest round of changes 🤦‍♂️

The tests pass now. Which reminds me, I should set up Travis 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants