This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#-*- coding: latin-1 -*- | |
"""This module contains pure Python implementations of the | |
Levenberg-Marquardt algorithm for data fitting. | |
""" | |
import numpy | |
from numpy import inner, max, diag, eye, Inf, dot | |
from numpy.linalg import norm, solve |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
from traits.api import * | |
from traitsui.api import * | |
from traits_persistence import HasTraitsPersistent | |
import numpy as np | |
from RedPitayaProxy import RP_Proxy | |
import sys, traceback |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#notes: figure out matplotlib/agg image interpolation | |
# start with src/_image_resample.h:resample(...) | |
# agg_span_image_filter_gray.h / very end: -> clipping | |
import matplotlib as mpl | |
mpl.use('agg') | |
import matplotlib.pyplot as plt | |
import matplotlib.colors as mcolors | |
import matplotlib.image as mimage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
import numpy as np | |
import pyopencl as cl | |
import pyopencl.array as cla | |
import threading | |
import sys | |
import time | |
ctx = cl.create_some_context(answers=['0', '1']) | |
queue = cl.CommandQueue(ctx) |