Giter Club home page Giter Club logo

notebooks's People

Contributors

jdblischak avatar vahidabdi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notebooks's Issues

AssertionError: laff.copy: size mismatch between x and y

8.2.5 Alternative Gauss Jordon Algorithm

Running in LAFF v3 environment, this was working before the latest commit but now throws the following error:


AssertionError Traceback (most recent call last)
in ()
6 A = np.matrix('1 -1 2; 2 0 2;-2 0 -4')
7 B = np.matrix('7;4;-10')
----> 8 GJ_Inverse_alt( A, B )
9 print(B)
10

in GJ_Inverse_alt(A, B)
26
27 laff.ger( -1.0, a01, b10t, B00 )
---> 28 laff.copy( -a01, b01 ) #b01 = -a01
29 laff.ger( -1.0, a21, b10t, B20 )
30 laff.copy( -a21, b21 ) #b21 = -a21

Web/laff/LAFF/notebooks/laff/vecvec/copy.py in copy(x, y)
23
24 if m_x is 1 and m_y is 1: # x is a row, y is a row
---> 25 assert n_x == n_y, "laff.copy: size mismatch between x and y"
26 for i in range(n_x): y[0, i] = x[0, i]
27

AssertionError: laff.copy: size mismatch between x and y

However there is nothing wrong in matrices:

A = np.matrix('1 -1 2; 2 0 2;-2 0 -4')
B = np.matrix('7;4;-10')
A*B
Out[11]:
matrix([[-17],
[ -6],
[ 26]])
np.linalg.inv(A) * B
Out[12]:
matrix([[-1.],
[-2.],
[ 3.]])

invscal issue: DivideByZero Error

Hi, I created a new issue here while I was working on 6.2.5 notebook

The original answers notebook throws back error and I've cited many previous notebook throwing errors on laff methods:

  • copy
  • invscal
  • gemm

Please checkout the whole issue and clarify.

Thanks

NameError raised from trsv_ltu when b is a column vector

In laff.matvec.trsv function, b is a vector with row or column size = 1. At line 75 ,the function trsv_ltu is called as trsv_ltu(A,b) .However,the function laff.matvec.trsv_ltu treats b as a 2D matrix

def trsv_ltu(A,B):
...

So, a call
laff.trsv('Lower triangular','Transpose','Unit diagonal',A,b)
where b is a column vector
will cause an error message
"dots( -l21, b2, beta1 )
NameError: name 'b2' is not defined"

ImportError: No module named 'laff.matvec.trsm_lnu': Running this in Koding.io

import numpy as np import laff import flame
L = np.matrix( ' 1, 0, 0. 0;\ -2, 1, 0, 0;\  1,-3, 1, 0;\  2, 3,-1, 1' )
U = np.matrix( ' 2,-1, 3,-2;\  0,-2, 1,-1;\  0, 0, 1, 2;\  0, 0, 0, 3' )
A = L * U Aold = np.matrix( np.copy( A ) )  B = np.matrix( np.eye( 4 ) )
print( 'A = ' ) print( A )
print( 'B = ' ) print( B )


/laff/LAFF/notebooks/laff/matmat/trsm.py in <module>()
      2 from numpy import shape
      3 from numpy import transpose
----> 4 from laff.matvec.trsm_lnu import trsm_lnu
      5 from laff.matvec.trsm_utn import trsm_utn
      6 from laff.matvec.trsm_ltu import trsm_ltu

ImportError: No module named 'laff.matvec.trsm_lnu'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.