Skip to content

Instantly share code, notes, and snippets.

@mblondel
mblondel / check_convex.py
Last active March 21, 2022 22:25
A small script to get numerical evidence that a function is convex
# Authors: Mathieu Blondel, Vlad Niculae
# License: BSD 3 clause
import numpy as np
def _gen_pairs(gen, max_iter, max_inner, random_state, verbose):
rng = np.random.RandomState(random_state)
# if tuple, interpret as randn
Problem:
$ sudo apt-get update
..........
..........
Err:13 http://extras.ubuntu.com/ubuntu xenial/main Sources
404 Not Found [IP: 91.189.92.152 80]
Ign:17 http://extras.ubuntu.com/ubuntu xenial/main amd64 Packages
Ign:20 http://extras.ubuntu.com/ubuntu xenial/main i386 Packages
Ign:22 http://extras.ubuntu.com/ubuntu xenial/main all Packages
Ign:23 http://extras.ubuntu.com/ubuntu xenial/main Translation-en_US