narray-convolve 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6aa29c31466271fedbbd1d898e75d89e1d8e3c58d4e8792a676eee027daf174
4
- data.tar.gz: 53e2e2de7a27c51556bf88ecd8ccfac48afcbfe31465e205ffdd7b7943975aec
3
+ metadata.gz: bfd31093f42b3aba3b73b6d43bd2e116c17634dbf25bb15da61a56080d4e3f9d
4
+ data.tar.gz: aa8c262649563c8919707c7f84ecde53d28db7eebf9a8ab0571d0e9bc6a1e3e0
5
5
  SHA512:
6
- metadata.gz: c46aabfc248fad88d6035644b817ea83e2415843c4792b3d77b8ad19b29e42ea7e1b67bf02217f6c4398bbf7fcdf25553c0665e5af76919a86133ff466fab0f5
7
- data.tar.gz: e8d70f2255f3b3be56da902754c98183d4a83025dc0c45a4540b35bb9052daa6e386a503f5f7fb96038091412bea9d514ae321d891d533817e5eb47f6eaf0978
6
+ metadata.gz: 312ee0156ad4e5910a30c50c9c005ba5de37aaa9cb9333b01e4a0277243450a55031afd83446cac393d1a4cef25e5c42e9062ee1510a01c6a8cd24925067ed68
7
+ data.tar.gz: 7afa89c66ca279dcf07b7a4e6e089a5101688f46a4ecedde9f00c516332fee4588d2b1b183065188f421fb63a58b4de2fde460e029d6bcdd845124a796f6a067
data/README.md CHANGED
@@ -23,7 +23,8 @@ Or install it yourself as:
23
23
  ## Usage
24
24
 
25
25
  Narray::Convolve is similar to numpy.convolve, but with a different order of second arguments.
26
- ```
26
+
27
+ ```ruby
27
28
  irb(main):001:0> require "narray/convolve"
28
29
  => true
29
30
  irb(main):002:0> n = Numo::DFloat[1,2,3]
@@ -39,15 +40,21 @@ irb(main):004:0> Narray::Convolve.convolve(n, m, :same)
39
40
  Numo::DFloat(view)#shape=[3]
40
41
  [1, 2.5, 4]
41
42
  ```
43
+ or
44
+ ```ruby
45
+ > Narray::Convolve.convolve([1,2,3], [0,1,0.5].reverse, :same)
46
+ => [1, 2.5, 4]
47
+ ```
48
+
42
49
 
43
50
  In case of Python
44
- ```
51
+ ```python
45
52
  >>> import numpy as np
46
53
  >>> np.convolve([1,2,3],[0,1,0.5], 'same')
47
54
  array([1. , 2.5, 4. ])
48
55
  >>>
49
56
  ```
50
- see: [numpy.convolve — NumPy v1.20 Manual](https://numpy.org/doc/stable/reference/generated/numpy.convolve.html#numpy-convolve)
57
+ See also: [numpy.convolve — NumPy v1.20 Manual](https://numpy.org/doc/stable/reference/generated/numpy.convolve.html#numpy-convolve)
51
58
 
52
59
 
53
60
 
@@ -9,9 +9,7 @@ module Narray
9
9
  # Narray::Convolve is similar to numpy.convolve,
10
10
  # but with a different order of second arguments.
11
11
  #
12
- # @example
13
- # Narray::Convolve
14
- #
12
+ # @example Narray::Convolve
15
13
  # require "narray/convolve"
16
14
  # n = Numo::DFloat[1,2,3]
17
15
  # m = Numo::DFloat[0,1,0.5].reverse
@@ -23,14 +21,15 @@ module Narray
23
21
  # Narray::Convolve.convolve([1,2,3], [0,1,0.5].reverse, :same)
24
22
  # # => [1, 2.5, 4]
25
23
  #
26
- # In case of numpy.convolve
24
+ #
25
+ # @example In case of numpy.convolve
27
26
  # >>> numpy.convolve([1,2,3],[0,1,0.5], 'same')
28
27
  # array([1. , 2.5, 4. ])
29
- #
28
+ # @See https://numpy.org/doc/stable/reference/generated/numpy.convolve.html#numpy-convolve [numpy.convolve — NumPy v1.20 Manual]
30
29
  #
31
30
  #
32
- # @param n [Numo::DFloat or Array]
33
- # @param m [Numo::DFloat or Array]
31
+ # @param n [Numo::DFloat or Array] 1st 1-dimensional input array.
32
+ # @param m [Numo::DFloat or Array] 2nd 1-dimensional input array.
34
33
  # @param mode [Symbol] (:full, :same, :valid)
35
34
  #
36
35
  # @return [Numo::DFloat] convolution of n and m.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Narray
4
4
  module Convolve
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: narray-convolve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - icm7216
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-09 00:00:00.000000000 Z
11
+ date: 2021-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit