Skip to content

Commit 080fc8f

Browse files
committed
skpkg: mirate src folder
1 parent c17c8e3 commit 080fc8f

4 files changed

Lines changed: 38 additions & 15 deletions

File tree

src/diffpy/__init__.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.
@@ -12,11 +12,3 @@
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

src/diffpy/fourigui/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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
@@ -15,7 +15,7 @@
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
2121
assert __version__ or True

src/diffpy/fourigui/functions.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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))

src/diffpy/fourigui/version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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
#

0 commit comments

Comments
 (0)