File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22##############################################################################
33#
4- # (c) 2022- 2025 The Trustees of Columbia University in the City of New York.
4+ # (c) 2025 The Trustees of Columbia University in the City of New York.
55# All rights reserved.
66#
77# File coded by: Billinge Group members and community contributors.
1212# See LICENSE.rst for license information.
1313#
1414##############################################################################
15- """Blank namespace package for module diffpy."""
16-
17-
18- from pkgutil import extend_path
19-
20- __path__ = extend_path (__path__ , __name__ )
21-
22- # End of file
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22##############################################################################
33#
4- # (c) 2022- 2025 The Trustees of Columbia University in the City of New York.
4+ # (c) 2025 The Trustees of Columbia University in the City of New York.
55# All rights reserved.
66#
7- # File coded by: Billinge Group members and community contributors .
7+ # File coded by: Billinge Group members.
88#
99# See GitHub contributions for a more detailed list of contributors.
1010# https://github.com/diffpy/diffpy.fourigui/graphs/contributors
1515"""Tool for visualizing 3D diffraction and PDF images."""
1616
1717# package version
18- from diffpy .fourigui .version import __version__
18+ from diffpy .fourigui .version import __version__ # noqa
1919
2020# silence the pyflakes syntax checker
2121assert __version__ or True
Original file line number Diff line number Diff line change 1+ import numpy as np
2+
3+
4+ def dot_product (a , b ):
5+ """Compute the dot product of two vectors of any size.
6+
7+ Ensure that the inputs, a and b, are of the same size.
8+ The supported types are "array_like" objects, which can
9+ be converted to a NumPy array. Examples include lists and tuples.
10+
11+ Parameters
12+ ----------
13+ a : array_like
14+ The first input vector.
15+ b : array_like
16+ The second input vector.
17+
18+ Returns
19+ -------
20+ float
21+ The dot product of the two vectors.
22+
23+ Examples
24+ --------
25+ Compute the dot product of two lists:
26+ >>> a = [1, 2, 3]
27+ >>> b = [4, 5, 6]
28+ >>> dot_product(a, b)
29+ 32.0
30+ """
31+ return float (np .dot (a , b ))
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22##############################################################################
33#
4- # (c) 2022- 2025 The Trustees of Columbia University in the City of New York.
4+ # (c) 2025 The Trustees of Columbia University in the City of New York.
55# All rights reserved.
66#
7- # File coded by: Billinge Group members and community contributors .
7+ # File coded by: Billinge Group members.
88#
99# See GitHub contributions for a more detailed list of contributors.
10- # https://github.com/diffpy/diffpy.fourigui/graphs/contributors
10+ # https://github.com/diffpy/diffpy.fourigui/graphs/contributors # noqa: E501
1111#
1212# See LICENSE.rst for license information.
1313#
You can’t perform that action at this time.
0 commit comments