vector.normalized() doesn't do what you expect

Bug #412731 reported by Rob Speer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Divisi
Confirmed
Medium
Unassigned

Bug Description

Intuitively, when you normalize a vector, you should get back another vector of unit length, or something that acts like it.

Instead, Divisi tries to normalize it the way it would normalize something bigger -- chopping it up into slices, finding the norm of each slice, and then giving you a view that divides those slices by their norm.

Except these slices are *scalars*, so if this worked it would give you something like [1.0, 1.0, 1.0, ...]. And it gets an IndexError anyway.

I think that .normalized() on a vector should normalize by the magnitude of that single vector (whether it uses a view to do so or not).

Rob Speer (rspeer)
Changed in divisi:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Ken Arnold (kenneth-arnold) wrote : Re: [Commonsense] [Bug 412731] [NEW] vector.normalized() doesn't do what you expect

A workaround for the moment is `.normalized_copy`.
-Ken

On Wed, Aug 12, 2009 at 5:30 PM, Rob Speer<email address hidden> wrote:
> Public bug reported:
>
> Intuitively, when you normalize a vector, you should get back another
> vector of unit length, or something that acts like it.
>
> Instead, Divisi tries to normalize it the way it would normalize
> something bigger -- chopping it up into slices, finding the norm of each
> slice, and then giving you a view that divides those slices by their
> norm.
>
> Except these slices are *scalars*, so if this worked it would give you
> something like [1.0, 1.0, 1.0, ...]. And it gets an IndexError anyway.
>
> I think that .normalized() on a vector should normalize by the magnitude
> of that single vector (whether it uses a view to do so or not).
>
> ** Affects: divisi
>     Importance: Medium
>         Status: Confirmed
>
> ** Changed in: divisi
>       Status: New => Confirmed
>
> ** Changed in: divisi
>   Importance: Undecided => Medium
>
> --
> vector.normalized() doesn't do what you expect
> https://bugs.launchpad.net/bugs/412731
> You received this bug notification because you are a member of
> Commonsense Computing, which is the registrant for Divisi.
>
> Status in Divisi: Confirmed
>
> Bug description:
> Intuitively, when you normalize a vector, you should get back another vector of unit length, or something that acts like it.
>
> Instead, Divisi tries to normalize it the way it would normalize something bigger -- chopping it up into slices, finding the norm of each slice, and then giving you a view that divides those slices by their norm.
>
> Except these slices are *scalars*, so if this worked it would give you something like [1.0, 1.0, 1.0, ...]. And it gets an IndexError anyway.
>
> I think that .normalized() on a vector should normalize by the magnitude of that single vector (whether it uses a view to do so or not).
>
> _______________________________________________
> Mailing list: https://launchpad.net/~commonsense
> Post to     : <email address hidden>
> Unsubscribe : https://launchpad.net/~commonsense
> More help   : https://help.launchpad.net/ListHelp
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.