Jonathan Daniel Weed and Robert Brian Niles were married July 27 at Kleinhans Music Hall in Buffalo. Judge J. Paul Oetken of the United States District Court for the Southern District of New York, for whom Mr. Niles served as a law clerk, officiated at a ceremony incorporating Jewish and Christian traditions.

In September, Mr. Weed (left), 31, is to begin work as an assistant professor of mathematics and data science at N.Y.U. He graduated magna cum laude from Princeton and received a Ph.D. in mathematics and statistics at M.I.T.

He is the son of Debra L. Weed and Daniel M. Weed of San Jose, Calif. Mr. Weed’s mother, who was a stay-at-home parent, until 1994 worked as a layout designer at Cypress Semiconductor in San Jose. She now volunteers as a Roman Catholic chaplain at various Santa Clara County jails. His father retired as the director of design at Global Foundries, a semiconductor company in Santa Clara, Calif.

Until this month, Mr. Niles, 30, served as a law clerk for Justice Elena Kagan of the Supreme Court. He graduated magna cum laude from Harvard, from which he also received a law degree magna cum laude and an M.B.A.