Skip to content

Commit

Permalink
[Website] Fix website publish (apache#20573)
Browse files Browse the repository at this point in the history
* fix website publish

* update

* remove .asf.yaml from version/master

* force include .asf.yaml

* include .htaccess

* add .asf.yaml check in CI
  • Loading branch information
barry-jin authored and NathanYyc committed Sep 16, 2021
1 parent e359bcd commit da94ffb
Show file tree
Hide file tree
Showing 5 changed files with 443 additions and 18 deletions.
7 changes: 6 additions & 1 deletion ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,12 @@ build_docs() {
mkdir -p $python_doc_folder && tar -xzf python-artifacts.tgz --directory $python_doc_folder
mkdir -p $api_folder/cpp/docs/api && tar -xzf c-artifacts.tgz --directory $api_folder/cpp/docs/api

# check if .htaccess file exists
# check if .asf.yaml file exists
if [ ! -f "html/.asf.yaml" ]; then
echo "html/.asf.yaml file does not exist. Exiting 1"
exit 1
fi
# check if .htaccess file exists
if [ ! -f "html/.htaccess" ]; then
echo "html/.htaccess file does not exist. Exiting 1"
exit 1
Expand Down
2 changes: 2 additions & 0 deletions docs/static_site/src/.asf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
publish:
whoami: asf-site
6 changes: 6 additions & 0 deletions docs/static_site/src/_config_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ markdown: kramdown
plugins:
- jekyll-feed
- jekyll-seo-tag

# Force include .asf.yaml
include:
- .asf.yaml
- .htaccess

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
Expand Down
16 changes: 12 additions & 4 deletions python/mxnet/numpy/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def eigvals(a):
return _mx_nd_np.linalg.eigvals(a)


def eigvalsh(a, UPLO='L'):
def eigvalsh(a, upper=False):
r"""Compute the eigenvalues real symmetric matrix.
Main difference from eigh: the eigenvectors are not computed.
Expand Down Expand Up @@ -890,9 +890,13 @@ def eigvalsh(a, UPLO='L'):
>>> a = np.array([[ 5.4119368 , 8.996273 , -5.086096 ],
... [ 0.8866155 , 1.7490431 , -4.6107802 ],
... [-0.08034172, 4.4172044 , 1.4528792 ]])
>>> LA.eigvalsh(a, UPLO='L')
>>> LA.eigvalsh(a, upper=False)
array([-2.87381886, 5.10144682, 6.38623114]) # in ascending order
"""
if(upper==False):
UPLO='L'
else:
UPLO='U'
return _mx_nd_np.linalg.eigvalsh(a, UPLO)


Expand Down Expand Up @@ -963,7 +967,7 @@ def eig(a):
return _mx_nd_np.linalg.eig(a)


def eigh(a, UPLO='L'):
def eigh(a, upper=False):
r"""Return the eigenvalues and eigenvectors real symmetric matrix.
Returns two objects, a 1-D array containing the eigenvalues of `a`, and
Expand Down Expand Up @@ -1018,12 +1022,16 @@ def eigh(a, UPLO='L'):
>>> a = np.array([[ 6.8189726 , -3.926585 , 4.3990498 ],
... [-0.59656644, -1.9166266 , 9.54532 ],
... [ 2.1093285 , 0.19688708, -1.1634291 ]])
>>> w, v = LA.eigh(a, UPLO='L')
>>> w, v = LA.eigh(a, upper=False)
>>> w
array([-2.175445 , -1.4581827, 7.3725457])
>>> v
array([[ 0.1805163 , -0.16569263, 0.9695154 ],
[ 0.8242942 , 0.56326365, -0.05721384],
[-0.53661287, 0.80949366, 0.23825769]])
"""
if(upper == False):
UPLO = 'L'
else:
UPLO = 'U'
return _mx_nd_np.linalg.eigh(a, UPLO)
Loading

0 comments on commit da94ffb

Please sign in to comment.