[go: up one dir, main page]

File: mnmatrix.py

package info (click to toggle)
iminuit 2.30.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,660 kB
  • sloc: cpp: 14,591; python: 11,177; makefile: 11; sh: 5
file content (18 lines) | stat: -rw-r--r-- 272 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from iminuit import Minuit


def cost(a, b, c):
    return (
        a**2
        + 0.25 * a**4
        + a * b
        + ((b - 1) / 0.6) ** 2
        - 2.5 * b * c
        + ((c - 2) / 0.5) ** 2
    )


m = Minuit(cost, 1, 1, 1)
m.migrad()

m.draw_mnmatrix(cl=[1, 2, 3])