def get_max_idx(self):
		max_idx = frappe.db.sql("""select max(idx) from `tabDocField` where parent = %s""",
			self.name)
		return max_idx and max_idx[0][0] or 0
Compute derivative w.r.t input given derivative w.r.t output.
dataset/ETHPy150Open frappe/frappe/frappe/core/doctype/doctype/doctype.py/DocType.get_max_idx--crossover with--dataset/ETHPy150Open nitishsrivastava/deepnet/deepnet/tanh_layer.py/TanhLayer.ComputeDeriv