Giter VIP home page Giter VIP logo

flamp's People

Contributors

c-f-h avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

flamp's Issues

`flamp.qr_solve` silently fails when `A` has zeros

Compare with lstsq.

import flamp
import numpy as np
A = np.array([[0, 1]]).T
b = np.array([2, 4])
print(np.linalg.lstsq(A, b, rcond=None)[0])
print(flamp.qr_solve(A, b))

Also try setting A = np.array([[0, 1], [1, 1]]).T.

`a.real` and `a.imag` not working properly for a complex flamp vector

For a complex numpy vector, e.g., a = (1+1j)*np.ones(2), the properties a.real and a.imag return vectors with the entry-wise real and imaginary parts of a. For a flamp vector, e.g., a = (1+1j)*flamp.ones(2), this is not working properly. a.real and a.imag return [mpc('1.0+1.0j',(216,216)) mpc('1.0+1.0j',(216,216))] and [0 0], respectivelly. As a workaround, calling real and imag on the vector entries works as expected, thus, [z.real for z in a] and [z.imag for z in a] return the proper vectors.

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.