# Examples from pyvista.DataSetFilters.integrate_data
# ===================================================

# Integrate data on a sphere mesh.
import pyvista as pv
import numpy as np
sphere = pv.Sphere(theta_resolution=100, phi_resolution=100)
sphere.point_data['data'] = 2 * np.ones(sphere.n_points)
integrated = sphere.integrate_data()

# There is only 1 point and cell, so access the only value.
integrated['Area'][0]
integrated['data'][0]

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code
