Skip to content

Commit

Permalink
fix: remove old legacy arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle committed Oct 31, 2024
1 parent ea30221 commit 2f57092
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions _website/tutorials/components/62 - Multidim Custom PDF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
" _N_OBS = 3 # dimension, can be omitted\n",
" _PARAMS = ['xshift', 'yshift'] # the name of the parameters\n",
"\n",
" @zfit.supports()\n",
" def _unnormalized_pdf(self, x, params):\n",
" @zfit.supports(norm=False)\n",
" def _pdf(self, x,norm, params):\n",
" x0 = x[0]\n",
" x1 = x[1]\n",
" x2 = x[2]\n",
Expand Down Expand Up @@ -81,7 +81,7 @@
"obs = xobs * yobs * zobs\n",
"\n",
"data_np = np.random.random(size=(1000, 3))\n",
"data = zfit.data.Data.from_numpy(array=data_np, obs=obs) # obs is automatically used as limits here."
"data = zfit.Data(data=data_np, obs=obs) # obs is automatically used as limits here."
]
},
{
Expand Down Expand Up @@ -176,8 +176,7 @@
"source": [
"AbsVectorShifted.register_analytic_integral(func=abs_vector_integral_from_any_to_any, limits=limits,\n",
" priority=51,\n",
" supports_norm_range=False, # False by default, but could be set to\n",
" supports_multiple_limits=False) # True. False -> autohandled"
" supports_norm=False)"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions components/62 - Multidim Custom PDF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
" _N_OBS = 3 # dimension, can be omitted\n",
" _PARAMS = ['xshift', 'yshift'] # the name of the parameters\n",
"\n",
" @zfit.supports()\n",
" def _unnormalized_pdf(self, x, params):\n",
" @zfit.supports(norm=False)\n",
" def _pdf(self, x,norm, params):\n",
" x0 = x[0]\n",
" x1 = x[1]\n",
" x2 = x[2]\n",
Expand Down Expand Up @@ -81,7 +81,7 @@
"obs = xobs * yobs * zobs\n",
"\n",
"data_np = np.random.random(size=(1000, 3))\n",
"data = zfit.data.Data.from_numpy(array=data_np, obs=obs) # obs is automatically used as limits here."
"data = zfit.Data(data=data_np, obs=obs) # obs is automatically used as limits here."
]
},
{
Expand Down Expand Up @@ -176,8 +176,7 @@
"source": [
"AbsVectorShifted.register_analytic_integral(func=abs_vector_integral_from_any_to_any, limits=limits,\n",
" priority=51,\n",
" supports_norm_range=False, # False by default, but could be set to\n",
" supports_multiple_limits=False) # True. False -> autohandled"
" supports_norm=False)"
]
},
{
Expand Down

0 comments on commit 2f57092

Please sign in to comment.