Exemple #1
0
func Scatter(x, y []float64) {
	xPy := py3.NewList(len(x))
	yPy := py3.NewList(len(y))

	for i, xx := range x {
		xPy.SetItem(i, py3.PyFloat_FromDouble(xx))
		yPy.SetItem(i, py3.PyFloat_FromDouble(y[i]))
	}

	args := py3.NewTuple(2)
	args.SetItem(0, xPy)
	args.SetItem(1, yPy)

	ctx.ft_scatter.CallObject(args)

	xPy.PyObj().DecRef()
	yPy.PyObj().DecRef()
}
Exemple #2
0
func Show() {
	empty_tuple := py3.NewTuple(0)
	ctx.ft_show.CallObject(empty_tuple)
	empty_tuple.PyObj().DecRef()
}