Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Update Linear Algebra #32

Merged
merged 2 commits into from
Aug 28, 2018
Merged

Update Linear Algebra #32

merged 2 commits into from
Aug 28, 2018

Conversation

Nosferican
Copy link
Collaborator

No description provided.

@Nosferican Nosferican added this to the Update to 0.7/1.0 syntax milestone Aug 28, 2018
@Nosferican Nosferican self-assigned this Aug 28, 2018
@Nosferican Nosferican requested a review from arnavs August 28, 2018 06:33
@arnavs arnavs mentioned this pull request Aug 28, 2018
53 tasks
.. code-block:: julia

sum(x .* y) # Gives the same result
sum(i * j for (i, j) ∈ zip(x, y)) # Gives the same result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is way too verbose. I would rather have an unnecessary allocation then something so complicated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sum(*, zip(x, y)) # errors out

but this works

sum(prod, zip(x, y))




sqrt(sum(abs2, x)) # Gives the same result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that leaving both of these examples in there is probably a good idea.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used sum(_ -> _^2, x) and other variants throughout the lectures to introduce a new convenient function.

Copy link
Member

@arnavs arnavs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues here.

@arnavs arnavs merged commit 378e85d into master Aug 28, 2018
@arnavs arnavs deleted the Update-Linear_Algebra branch August 29, 2018 03:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants